home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Programming / fpc / amigaunits / intuition.pas < prev    next >
Pascal/Delphi Source File  |  1998-09-22  |  192KB  |  5,625 lines

  1. {
  2.     This file is part of the Free Pascal run time library.
  3.  
  4.     A file in Amiga system run time library.
  5.     Copyright (c) 1998 by Nils Sjoholm
  6.     member of the Amiga RTL development team.
  7.  
  8.     See the file COPYING.FPC, included in this distribution,
  9.     for details about the copyright.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14.  
  15.  **********************************************************************}
  16.  
  17. unit intuition;
  18.  
  19. INTERFACE
  20.  
  21. uses exec, graphics, utility, inputevent, timer, layers;
  22.  
  23. {
  24.  * NOTE:  intuition/iobsolete.h is included at the END of this file!
  25.  }
  26.  
  27. { ======================================================================== }
  28. { === IntuiText ========================================================== }
  29. { ================================= ======================================= }
  30. { IntuiText is a series of strings that start with a screen location
  31.  *  (always relative to the upper-left corner of something) and then the
  32.  *  text of the string.  The text is null-terminated.
  33.  }
  34. Type
  35.     pIntuiText = ^tIntuiText;
  36.     tIntuiText = record
  37.         FrontPen,
  38.         BackPen         : Byte;         { the pen numbers for the rendering }
  39.         DrawMode        : Byte;         { the mode for rendering the text }
  40.         LeftEdge        : Integer;        { relative start location for the text }
  41.         TopEdge         : Integer;        { relative start location for the text }
  42.         ITextFont       : pTextAttr;  { if NULL, you accept the default }
  43.         IText           : STRPTR;       { pointer to null-terminated text }
  44.         NextText        : pIntuiText;   { continuation to TxWrite another text }
  45.     end;
  46.  
  47.  
  48.  
  49. { ======================================================================== }
  50. { === Border ============================================================= }
  51. { ======================================================================== }
  52. { Data type Border, used for drawing a series of lines which is intended for
  53.  *  use as a border drawing, but which may, in fact, be used to render any
  54.  *  arbitrary vector shape.
  55.  *  The routine DrawBorder sets up the RastPort with the appropriate
  56.  *  variables, then does a Move to the first coordinate, then does Draws
  57.  *  to the subsequent coordinates.
  58.  *  After all the Draws are done, if NextBorder is non-zero we call DrawBorder
  59.  *  recursively
  60.  }
  61. Type
  62.     pBorder = ^tBorder;
  63.     tBorder = record
  64.         LeftEdge,
  65.         TopEdge         : Integer;        { initial offsets from the origin }
  66.         FrontPen,
  67.         BackPen         : Byte;         { pens numbers for rendering }
  68.         DrawMode        : Byte;         { mode for rendering }
  69.         Count           : Shortint;         { number of XY pairs }
  70.         XY              : Pointer;      { vector coordinate pairs rel to LeftTop}
  71.         NextBorder      : pBorder;      { pointer to any other Border too }
  72.     end;
  73.  
  74. { ======================================================================== }
  75. { === MenuItem =========================================================== }
  76. { ======================================================================== }
  77.  
  78. Type
  79.  
  80.     pMenuItem = ^tMenuItem;
  81.     tMenuItem = record
  82.         NextItem        : pMenuItem;    { pointer to next in chained list }
  83.         LeftEdge,
  84.         TopEdge         : Integer;        { position of the select box }
  85.         Width,
  86.         Height          : Integer;        { dimensions of the select box }
  87.         Flags           : Word;        { see the defines below }
  88.  
  89.         MutualExclude   : Longint;      { set bits mean this item excludes that }
  90.  
  91.         ItemFill        : Pointer;      { points to Image, IntuiText, or NULL }
  92.  
  93.     { when this item is pointed to by the cursor and the items highlight
  94.      *  mode HIGHIMAGE is selected, this alternate image will be displayed
  95.      }
  96.  
  97.         SelectFill      : Pointer;      { points to Image, IntuiText, or NULL }
  98.  
  99.         Command         : Char;         { only if appliprog sets the COMMSEQ flag }
  100.  
  101.         SubItem         : pMenuItem;    { if non-zero, DrawMenu shows "->" }
  102.  
  103.     { The NextSelect field represents the menu number of next selected
  104.      *  item (when user has drag-selected several items)
  105.      }
  106.  
  107.         NextSelect      : Word;
  108.     end;
  109.  
  110.  
  111. Const
  112.  
  113. { FLAGS SET BY THE APPLIPROG }
  114.     CHECKIT     = $0001;        { whether to check this item if selected }
  115.     ITEMTEXT    = $0002;        { set if textual, clear if graphical item }
  116.     COMMSEQ     = $0004;        { set if there's an command sequence }
  117.     MENUTOGGLE  = $0008;        { set to toggle the check of a menu item }
  118.     ITEMENABLED = $0010;        { set if this item is enabled }
  119.  
  120. { these are the SPECIAL HIGHLIGHT FLAG state meanings }
  121.     HIGHFLAGS   = $00C0;        { see definitions below for these bits }
  122.     HIGHIMAGE   = $0000;        { use the user's "select image" }
  123.     HIGHCOMP    = $0040;        { highlight by complementing the selectbox }
  124.     HIGHBOX     = $0080;        { highlight by "boxing" the selectbox }
  125.     HIGHNONE    = $00C0;        { don't highlight }
  126.  
  127. { FLAGS SET BY BOTH APPLIPROG AND INTUITION }
  128.     CHECKED     = $0100;        { if CHECKIT, then set this when selected }
  129.  
  130. { FLAGS SET BY INTUITION }
  131.     ISDRAWN     = $1000;        { this item's subs are currently drawn }
  132.     HIGHITEM    = $2000;        { this item is currently highlighted }
  133.     MENUTOGGLED = $4000;        { this item was already toggled }
  134.  
  135.  
  136. { ======================================================================== }
  137. { === Menu =============================================================== }
  138. { ======================================================================== }
  139. Type
  140.  
  141.     pMenu = ^tMenu;
  142.     tMenu = record
  143.         NextMenu        : pMenu;        { same level }
  144.         LeftEdge,
  145.         TopEdge         : Integer;        { position of the select box }
  146.         Width,
  147.         Height          : Integer;        { dimensions of the select box }
  148.         Flags           : Word;        { see flag definitions below }
  149.         MenuName        : STRPTR;       { text for this Menu Header }
  150.         FirstItem       : pMenuItem;  { pointer to first in chain }
  151.  
  152.     { these mysteriously-named variables are for internal use only }
  153.  
  154.         JazzX,
  155.         JazzY,
  156.         BeatX,
  157.         BeatY           : Integer;
  158.     end;
  159.  
  160. CONST
  161. { FLAGS SET BY BOTH THE APPLIPROG AND INTUITION }
  162.     MENUENABLED = $0001;        { whether or not this menu is enabled }
  163.  
  164. { FLAGS SET BY INTUITION }
  165.     MIDRAWN     = $0100;        { this menu's items are currently drawn }
  166.  
  167.  
  168.  
  169.  
  170. { ======================================================================== }
  171. { === Gadget ============================================================= }
  172. { ======================================================================== }
  173.  
  174. Type
  175.  
  176.     pGadget = ^tGadget;
  177.     tGadget = record
  178.         NextGadget      : pGadget;      { next gadget in the list }
  179.  
  180.         LeftEdge,
  181.         TopEdge         : Integer;        { "hit box" of gadget }
  182.         Width,
  183.         Height          : Integer;        { "hit box" of gadget }
  184.  
  185.         Flags           : Word;        { see below for list of defines }
  186.  
  187.         Activation      : Word;        { see below for list of defines }
  188.  
  189.         GadgetType      : Word;        { see below for defines }
  190.  
  191.     { appliprog can specify that the Gadget be rendered as either as Border
  192.      * or an Image.  This variable points to which (or equals NULL if there's
  193.      * nothing to be rendered about this Gadget)
  194.      }
  195.  
  196.         GadgetRender    : Pointer;
  197.  
  198.     { appliprog can specify "highlighted" imagery rather than algorithmic
  199.      * this can point to either Border or Image data
  200.      }
  201.  
  202.         SelectRender    : Pointer;
  203.  
  204.         GadgetText      : pIntuiText; { text for this gadget }
  205.  
  206.     { by using the MutualExclude word, the appliprog can describe
  207.      * which gadgets mutually-exclude which other ones.  The bits
  208.      * in MutualExclude correspond to the gadgets in object containing
  209.      * the gadget list.  If this gadget is selected and a bit is set
  210.      * in this gadget's MutualExclude and the gadget corresponding to
  211.      * that bit is currently selected (e.g. bit 2 set and gadget 2
  212.      * is currently selected) that gadget must be unselected.
  213.      * Intuition does the visual unselecting (with checkmarks) and
  214.      * leaves it up to the program to unselect internally
  215.      }
  216.  
  217.         MutualExclude   : Longint;      { set bits mean this gadget excludes that gadget }
  218.  
  219.     { pointer to a structure of special data required by Proportional,
  220.      * String and Longint Gadgets
  221.      }
  222.  
  223.         SpecialInfo     : Pointer;
  224.  
  225.         GadgetID        : Word;        { user-definable ID field }
  226.         UserData        : Pointer;      { ptr to general purpose User data (ignored by In) }
  227.     end;
  228.  
  229.  pExtGadget = ^tExtGadget;
  230.  tExtGadget = record
  231.     { The first fields match struct Gadget exactly }
  232.     NextGadget     : pExtGadget;  { Matches struct Gadget }
  233.     LeftEdge, TopEdge,            { Matches struct Gadget }
  234.     Width, Height  : Integer;     { Matches struct Gadget }
  235.     Flags,                        { Matches struct Gadget }
  236.     Activation,                   { Matches struct Gadget }
  237.     GadgetType     : WORD;        { Matches struct Gadget }
  238.     GadgetRender,                 { Matches struct Gadget }
  239.     SelectRender   : Pointer;     { Matches struct Gadget }
  240.     GadgetText     : pIntuiText;  { Matches struct Gadget }
  241.     MutualExclude  : Longint;     { Matches struct Gadget }
  242.     SpecialInfo    : Pointer;     { Matches struct Gadget }
  243.     GadgetID       : WORD;        { Matches struct Gadget }
  244.     UserData       : Pointer;     { Matches struct Gadget }
  245.  
  246.     { These fields only exist under V39 and only if GFLG_EXTENDED is set }
  247.     MoreFlags      : ULONG;     { see GMORE_ flags below }
  248.     BoundsLeftEdge,             { Bounding extent for gadget, valid   }
  249.     BoundsTopEdge,              { only if GMORE_BOUNDS is set.  The   }
  250.     BoundsWidth,                { GFLG_RELxxx flags affect these      }
  251.     BoundsHeight   : Integer;      { coordinates as well.        }
  252.  end;
  253.  
  254.  
  255. CONST
  256. { --- Gadget.Flags values      --- }
  257. { combinations in these bits describe the highlight technique to be used }
  258.  GFLG_GADGHIGHBITS  = $0003;
  259.  GFLG_GADGHCOMP     = $0000;  { Complement the select box }
  260.  GFLG_GADGHBOX      = $0001;  { Draw a box around the image }
  261.  GFLG_GADGHIMAGE    = $0002;  { Blast in this alternate image }
  262.  GFLG_GADGHNONE     = $0003;  { don't highlight }
  263.  
  264.  GFLG_GADGIMAGE     = $0004;  { set IF GadgetRender AND SelectRender
  265.                                    * point to an Image structure, clear
  266.                                    * if they point to Border structures
  267.                                    }
  268.  
  269. { combinations in these next two bits specify to which corner the gadget's
  270.  *  Left & Top coordinates are relative.  If relative to Top/Left,
  271.  *  these are "normal" coordinates (everything is relative to something in
  272.  *  this universe).
  273.  *
  274.  * Gadget positions and dimensions are relative to the window or
  275.  * requester which contains the gadget
  276.  }
  277.  GFLG_RELBOTTOM   = $0008;  { vert. pos. is relative to bottom edge }
  278.  GFLG_RELRIGHT    = $0010;  { horiz. pos. is relative to right edge }
  279.  GFLG_RELWIDTH    = $0020;  { width is relative to req/window    }
  280.  GFLG_RELHEIGHT   = $0040;  { height is relative to req/window   }
  281.  
  282. { New for V39: GFLG_RELSPECIAL allows custom gadget implementors to
  283.  * make gadgets whose position and size depend in an arbitrary way
  284.  * on their window's dimensions.  The GM_LAYOUT method will be invoked
  285.  * for such a gadget (or any other GREL_xxx gadget) at suitable times,
  286.  * such as when the window opens or the window's size changes.
  287.  }
  288.  GFLG_RELSPECIAL  = $4000;  { custom gadget has special relativity.
  289.                                    * Gadget box values are absolutes, but
  290.                                    * can be changed via the GM_LAYOUT method.
  291.                                    }
  292.  
  293.  GFLG_SELECTED    = $0080;  { you may initialize AND look at this        }
  294.  
  295. { the GFLG_DISABLED flag is initialized by you and later set by Intuition
  296.  * according to your calls to On/OffGadget().  It specifies whether or not
  297.  * this Gadget is currently disabled from being selected
  298.  }
  299.  GFLG_DISABLED    = $0100;
  300.  
  301. { These flags specify the type of text field that Gadget.GadgetText
  302.  * points to.  In all normal (pre-V36) gadgets which you initialize
  303.  * this field should always be zero.  Some types of gadget objects
  304.  * created from classes will use these fields to keep track of
  305.  * types of labels/contents that different from IntuiText, but are
  306.  * stashed in GadgetText.
  307.  }
  308.  
  309.  GFLG_LABELMASK   = $3000;
  310.  GFLG_LABELITEXT  = $0000;  { GadgetText points to IntuiText     }
  311.  GFLG_LABELSTRING = $1000;  { GadgetText points to (UBYTE *)     }
  312.  GFLG_LABELIMAGE  = $2000;  { GadgetText points to Image (object)        }
  313.  
  314. { New for V37: GFLG_TABCYCLE }
  315.  GFLG_TABCYCLE    = $0200;  { (string OR custom) gadget participates in
  316.                                    * cycling activation with Tab or Shift-Tab
  317.                                    }
  318. { New for V37: GFLG_STRINGEXTEND.  We discovered that V34 doesn't properly
  319.  * ignore the value we had chosen for the Gadget->Activation flag
  320.  * GACT_STRINGEXTEND.  NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
  321.  * The Gadget->Flags bit GFLG_STRINGEXTEND is provided as a synonym which is
  322.  * safe under V34, and equivalent to GACT_STRINGEXTEND under V37.
  323.  * (Note that the two flags are not numerically equal)
  324.  }
  325.  GFLG_STRINGEXTEND = $0400;  { this String Gadget has StringExtend        }
  326.  
  327. { New for V39: GFLG_IMAGEDISABLE.  This flag is automatically set if
  328.  * the custom image of this gadget knows how to do disabled rendering
  329.  * (more specifically, if its IA_SupportsDisable attribute is TRUE).
  330.  * Intuition uses this to defer the ghosting to the image-class,
  331.  * instead of doing it itself (the old compatible way).
  332.  * Do not set this flag yourself - Intuition will do it for you.
  333.  }
  334.  
  335.  GFLG_IMAGEDISABLE = $0800;  { Gadget's image knows how to do disabled
  336.                                    * rendering
  337.                                    }
  338.  
  339. { New for V39:  If set, this bit means that the Gadget is actually
  340.  * a struct ExtGadget, with new fields and flags.  All V39 boopsi
  341.  * gadgets are ExtGadgets.  Never ever attempt to read the extended
  342.  * fields of a gadget if this flag is not set.
  343.  }
  344.  GFLG_EXTENDED    = $8000;  { Gadget is extended }
  345.  
  346. { ---  Gadget.Activation flag values   --- }
  347. { Set GACT_RELVERIFY if you want to verify that the pointer was still over
  348.  * the gadget when the select button was released.  Will cause
  349.  * an IDCMP_GADGETUP message to be sent if so.
  350.  }
  351.  GACT_RELVERIFY    = $0001;
  352.  
  353. { the flag GACT_IMMEDIATE, when set, informs the caller that the gadget
  354.  *  was activated when it was activated.  This flag works in conjunction with
  355.  *  the GACT_RELVERIFY flag
  356.  }
  357.  GACT_IMMEDIATE    = $0002;
  358.  
  359. { the flag GACT_ENDGADGET, when set, tells the system that this gadget,
  360.  * when selected, causes the Requester to be ended.  Requesters
  361.  * that are ended are erased and unlinked from the system.
  362.  }
  363.  GACT_ENDGADGET    = $0004;
  364.  
  365. { the GACT_FOLLOWMOUSE flag, when set, specifies that you want to receive
  366.  * reports on mouse movements while this gadget is active.
  367.  * You probably want to set the GACT_IMMEDIATE flag when using
  368.  * GACT_FOLLOWMOUSE, since that's the only reasonable way you have of
  369.  * learning why Intuition is suddenly sending you a stream of mouse
  370.  * movement events.  If you don't set GACT_RELVERIFY, you'll get at
  371.  * least one Mouse Position event.
  372.  }
  373.  GACT_FOLLOWMOUSE = $0008;
  374.  
  375. { if any of the BORDER flags are set in a Gadget that's included in the
  376.  * Gadget list when a Window is opened, the corresponding Border will
  377.  * be adjusted to make room for the Gadget
  378.  }
  379.  GACT_RIGHTBORDER = $0010;
  380.  GACT_LEFTBORDER  = $0020;
  381.  GACT_TOPBORDER   = $0040;
  382.  GACT_BOTTOMBORDER= $0080;
  383.  GACT_BORDERSNIFF = $8000;  { neither set nor rely on this bit   }
  384.  
  385.  GACT_TOGGLESELECT= $0100;  { this bit for toggle-select mode }
  386.  GACT_BOOLEXTEND  = $2000;  { this Boolean Gadget has a BoolInfo }
  387.  
  388. { should properly be in StringInfo, but aren't }
  389.  GACT_STRINGLEFT  = $0000;  { NOTE WELL: that this has value zero        }
  390.  GACT_STRINGCENTER= $0200;
  391.  GACT_STRINGRIGHT = $0400;
  392.  GACT_LONGINT     = $0800;  { this String Gadget is for Long Ints        }
  393.  GACT_ALTKEYMAP   = $1000;  { this String has an alternate keymap        }
  394.  GACT_STRINGEXTEND= $2000;  { this String Gadget has StringExtend        }
  395.                                   { NOTE: NEVER SET GACT_STRINGEXTEND IF YOU
  396.                                    * ARE RUNNING ON LESS THAN V36!  SEE
  397.                                    * GFLG_STRINGEXTEND (ABOVE) INSTEAD
  398.                                    }
  399.  
  400.  GACT_ACTIVEGADGET = $4000;  { this gadget is "active".  This flag
  401.                                    * is maintained by Intuition, and you
  402.                                    * cannot count on its value persisting
  403.                                    * while you do something on your program's
  404.                                    * task.  It can only be trusted by
  405.                                    * people implementing custom gadgets
  406.                                    }
  407.  
  408. { note $8000 is used above (GACT_BORDERSNIFF);
  409.  * all Activation flags defined }
  410.  
  411. { --- GADGET TYPES ------------------------------------------------------- }
  412. { These are the Gadget Type definitions for the variable GadgetType
  413.  * gadget number type MUST start from one.  NO TYPES OF ZERO ALLOWED.
  414.  * first comes the mask for Gadget flags reserved for Gadget typing
  415.  }
  416.  GTYP_GADGETTYPE = $FC00;  { all Gadget Global Type flags (padded) }
  417.  GTYP_SYSGADGET  = $8000;  { 1 = Allocated by the system, 0 = by app. }
  418.  GTYP_SCRGADGET  = $4000;  { 1 = ScreenGadget, 0 = WindowGadget }
  419.  GTYP_GZZGADGET  = $2000;  { 1 = for WFLG_GIMMEZEROZERO borders }
  420.  GTYP_REQGADGET  = $1000;  { 1 = this is a Requester Gadget }
  421. { system gadgets }
  422.  GTYP_SIZING     = $0010;
  423.  GTYP_WDRAGGING  = $0020;
  424.  GTYP_SDRAGGING  = $0030;
  425.  GTYP_WUPFRONT   = $0040;
  426.  GTYP_SUPFRONT   = $0050;
  427.  GTYP_WDOWNBACK  = $0060;
  428.  GTYP_SDOWNBACK  = $0070;
  429.  GTYP_CLOSE      = $0080;
  430. { application gadgets }
  431.  GTYP_BOOLGADGET = $0001;
  432.  GTYP_GADGET0002 = $0002;
  433.  GTYP_PROPGADGET = $0003;
  434.  GTYP_STRGADGET  = $0004;
  435.  GTYP_CUSTOMGADGET    =   $0005;
  436.  
  437.  
  438. {* GTYP_GTYPEMASK is a mask you can apply to tell what class
  439.  * of gadget this is.  The possible classes follow.
  440.  *}
  441.  GTYP_GTYPEMASK        =  $0007;
  442.  
  443. { This bit in GadgetType is reserved for undocumented internal use
  444.  * by the Gadget Toolkit, and cannot be used nor relied on by
  445.  * applications:        $0100;
  446.  }
  447.  
  448. { New for V39.  Gadgets which have the GFLG_EXTENDED flag set are
  449.  * actually ExtGadgets, which have more flags.  The GMORE_xxx
  450.  * identifiers describe those flags.  For GMORE_SCROLLRASTER, see
  451.  * important information in the ScrollWindowRaster() autodoc.
  452.  * NB: GMORE_SCROLLRASTER must be set before the gadget is
  453.  * added to a window.
  454.  }
  455.  GMORE_BOUNDS       = $00000001; { ExtGadget has valid Bounds }
  456.  GMORE_GADGETHELP   = $00000002; { This gadget responds to gadget help }
  457.  GMORE_SCROLLRASTER = $00000004; { This (custom) gadget uses ScrollRaster }
  458.  
  459. { ======================================================================== }
  460. { === BoolInfo======================================================= }
  461. { ======================================================================== }
  462. { This is the special data needed by an Extended Boolean Gadget
  463.  * Typically this structure will be pointed to by the Gadget field SpecialInfo
  464.  }
  465. Type
  466.     pBoolInfo = ^tBoolInfo;
  467.     tBoolInfo = record
  468.         Flags   : Word;        { defined below }
  469.         Mask    : Pointer; { bit mask for highlighting and selecting
  470.                          * mask must follow the same rules as an Image
  471.                          * plane.  It's width and height are determined
  472.                          * by the width and height of the gadget's
  473.                          * select box. (i.e. Gadget.Width and .Height).
  474.                          }
  475.         Reserved : ULONG;     { set to 0      }
  476.     end;
  477.  
  478. Const
  479.  
  480. { set BoolInfo.Flags to this flag bit.
  481.  * in the future, additional bits might mean more stuff hanging
  482.  * off of BoolInfo.Reserved.
  483. }
  484.     BOOLMASK    = $0001;        { extension is for masked gadget }
  485.  
  486. { ======================================================================== }
  487. { === PropInfo =========================================================== }
  488. { ======================================================================== }
  489. { this is the special data required by the proportional Gadget
  490.  * typically, this data will be pointed to by the Gadget variable SpecialInfo
  491.  }
  492.  
  493. Type
  494.  
  495.     pPropInfo = ^tPropInfo;
  496.     tPropInfo = record
  497.         Flags   : Word;        { general purpose flag bits (see defines below) }
  498.  
  499.     { You initialize the Pot variables before the Gadget is added to
  500.      * the system.  Then you can look here for the current settings
  501.      * any time, even while User is playing with this Gadget.  To
  502.      * adjust these after the Gadget is added to the System, use
  503.      * ModifyProp();  The Pots are the actual proportional settings,
  504.      * where a value of zero means zero and a value of MAXPOT means
  505.      * that the Gadget is set to its maximum setting.
  506.      }
  507.  
  508.         HorizPot        : WORD; { 16-bit FixedPoint horizontal quantity percentage }
  509.         VertPot         : WORD; { 16-bit FixedPoint vertical quantity percentage }
  510.  
  511.     { the 16-bit FixedPoint Body variables describe what percentage of
  512.      * the entire body of stuff referred to by this Gadget is actually
  513.      * shown at one time.  This is used with the AUTOKNOB routines,
  514.      * to adjust the size of the AUTOKNOB according to how much of
  515.      * the data can be seen.  This is also used to decide how far
  516.      * to advance the Pots when User hits the Container of the Gadget.
  517.      * For instance, if you were controlling the display of a 5-line
  518.      * Window of text with this Gadget, and there was a total of 15
  519.      * lines that could be displayed, you would set the VertBody value to
  520.      *     (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3.
  521.      * Therefore, the AUTOKNOB would fill 1/3 of the container, and
  522.      * if User hits the Cotainer outside of the knob, the pot would
  523.      * advance 1/3 (plus or minus) If there's no body to show, or
  524.      * the total amount of displayable info is less than the display area,
  525.      * set the Body variables to the MAX.  To adjust these after the
  526.      * Gadget is added to the System, use ModifyProp();
  527.      }
  528.  
  529.         HorizBody       : Word;        { horizontal Body }
  530.         VertBody        : Word;        { vertical Body }
  531.  
  532.     { these are the variables that Intuition sets and maintains }
  533.  
  534.         CWidth          : Word;        { Container width (with any relativity absoluted) }
  535.         CHeight         : Word;        { Container height (with any relativity absoluted) }
  536.         HPotRes,
  537.         VPotRes         : Word;        { pot increments }
  538.         LeftBorder      : Word;        { Container borders }
  539.         TopBorder       : Word;        { Container borders }
  540.     end;
  541.  
  542. CONST
  543. { --- FLAG BITS ---------------------------------------------------------- }
  544.  AUTOKNOB     =   $0001;  { this flag sez:  gimme that old auto-knob }
  545. { NOTE: if you do not use an AUTOKNOB for a proportional gadget,
  546.  * you are currently limited to using a single Image of your own
  547.  * design: Intuition won't handle a linked list of images as
  548.  * a proportional gadget knob.
  549.  }
  550.  
  551.  FREEHORIZ     =  $0002;  { IF set, the knob can move horizontally }
  552.  FREEVERT      =  $0004;  { IF set, the knob can move vertically }
  553.  PROPBORDERLESS =  $0008;  { IF set, no border will be rendered }
  554.  KNOBHIT       =  $0100;  { set when this Knob is hit }
  555.  PROPNEWLOOK   =  $0010;  { set this IF you want to get the new
  556.                                  * V36 look
  557.                                  }
  558.  
  559.  KNOBHMIN      =  6;       { minimum horizontal size of the Knob }
  560.  KNOBVMIN      =  4;       { minimum vertical size of the Knob }
  561.  MAXBODY       =  $FFFF;  { maximum body value }
  562.  MAXPOT        =  $FFFF;  { maximum pot value }
  563.  
  564. { ======================================================================== }
  565. { === StringInfo ========================================================= }
  566. { ======================================================================== }
  567. { this is the special data required by the string Gadget
  568.  * typically, this data will be pointed to by the Gadget variable SpecialInfo
  569.  }
  570.  
  571. Type
  572.  
  573.     pStringInfo = ^tStringInfo;
  574.     tStringInfo = record
  575.     { you initialize these variables, and then Intuition maintains them }
  576.         Buffer          : STRPTR;       { the buffer containing the start and final string }
  577.         UndoBuffer      : STRPTR;       { optional buffer for undoing current entry }
  578.         BufferPos       : Integer;        { character position in Buffer }
  579.         MaxChars        : Integer;        { max number of chars in Buffer (including NULL) }
  580.         DispPos         : Integer;        { Buffer position of first displayed character }
  581.  
  582.     { Intuition initializes and maintains these variables for you }
  583.  
  584.         UndoPos         : Integer;        { character position in the undo buffer }
  585.         NumChars        : Integer;        { number of characters currently in Buffer }
  586.         DispCount       : Integer;        { number of whole characters visible in Container }
  587.         CLeft,
  588.         CTop            : Integer;        { topleft offset of the container }
  589.  
  590.     { you can initialize this variable before the gadget is submitted to
  591.      * Intuition, and then examine it later to discover what Longint
  592.      * the user has entered (if the user never plays with the gadget,
  593.      * the value will be unchanged from your initial setting)
  594.      }
  595.         Extension       : Pointer;
  596.         _LongInt         : Longint;
  597.  
  598.     { If you want this Gadget to use your own Console keymapping, you
  599.      * set the ALTKEYMAP bit in the Activation flags of the Gadget, and then
  600.      * set this variable to point to your keymap.  If you don't set the
  601.      * ALTKEYMAP, you'll get the standard ASCII keymapping.
  602.      }
  603.  
  604.         AltKeyMap       : Pointer;
  605.     end;
  606.  
  607.  
  608. { ======================================================================== }
  609. { === Requester ========================================================== }
  610. { ======================================================================== }
  611.  
  612. Type
  613.  
  614.     pRequester = ^tRequester;
  615.     tRequester = record
  616.     { the ClipRect and BitMap and used for rendering the requester }
  617.         OlderRequest    : pRequester;
  618.         LeftEdge,
  619.         TopEdge         : Integer;        { dimensions of the entire box }
  620.         Width,
  621.         Height          : Integer;        { dimensions of the entire box }
  622.         RelLeft,
  623.         RelTop          : Integer;        { for Pointer relativity offsets }
  624.  
  625.         ReqGadget       : pGadget;    { pointer to a list of Gadgets }
  626.         ReqBorder       : pBorder;    { the box's border }
  627.         ReqText         : pIntuiText; { the box's text }
  628.         Flags           : Word;        { see definitions below }
  629.  
  630.     { pen number for back-plane fill before draws }
  631.  
  632.         BackFill        : Byte;
  633.  
  634.     { Layer in place of clip rect       }
  635.  
  636.         ReqLayer        : pLayer;
  637.  
  638.         ReqPad1         : Array [0..31] of Byte;
  639.  
  640.     { If the BitMap plane pointers are non-zero, this tells the system
  641.      * that the image comes pre-drawn (if the appliprog wants to define
  642.      * it's own box, in any shape or size it wants!);  this is OK by
  643.      * Intuition as long as there's a good correspondence between
  644.      * the image and the specified Gadgets
  645.      }
  646.  
  647.         ImageBMap       : pBitMap;    { points to the BitMap of PREDRAWN imagery }
  648.         RWindow         : Pointer;      { added.  points back to Window }
  649.         ReqImage        : Pointer;
  650.         ReqPad2         : Array [0..31] of Shortint;
  651.     end;
  652.  
  653.  
  654. Const
  655.  
  656. { FLAGS SET BY THE APPLIPROG }
  657.     POINTREL            = $0001;    { if POINTREL set, TopLeft is relative to pointer}
  658.     PREDRAWN            = $0002;    { if ReqBMap points to predrawn Requester imagery }
  659.     NOISYREQ            = $0004;    { if you don't want requester to filter input          }
  660.  
  661.     SIMPLEREQ           = $0010;
  662.         { to use SIMPLEREFRESH layer (recommended)     }
  663.  
  664.     { New for V36          }
  665.     USEREQIMAGE         = $0020;
  666.          {  render linked list ReqImage after BackFill
  667.          * but before gadgets and text
  668.          }
  669.     NOREQBACKFILL       = $0040;
  670.         { don't bother filling requester with Requester.BackFill pen   }
  671.  
  672.  
  673. { FLAGS SET BY INTUITION }
  674.     REQOFFWINDOW        = $1000;        { part of one of the Gadgets was offwindow }
  675.     REQACTIVE           = $2000;        { this requester is active }
  676.     SYSREQUEST          = $4000;        { this requester caused by system }
  677.     DEFERREFRESH        = $8000;        { this Requester stops a Refresh broadcast }
  678.  
  679.  
  680.  
  681.  
  682. { ======================================================================== }
  683. { === Image ============================================================== }
  684. { ======================================================================== }
  685. { This is a brief image structure for very simple transfers of
  686.  * image data to a RastPort
  687.  }
  688.  
  689. Type
  690.     pImage = ^tImage;
  691.     tImage = record
  692.         LeftEdge        : Integer;        { starting offset relative to some origin }
  693.         TopEdge         : Integer;        { starting offsets relative to some origin }
  694.         Width           : Integer;        { pixel size (though data is word-aligned) }
  695.         Height,
  696.         Depth           : Integer;        { pixel sizes }
  697.         ImageData       : Pointer;      { pointer to the actual word-aligned bits }
  698.  
  699.     { the PlanePick and PlaneOnOff variables work much the same way as the
  700.      * equivalent GELS Bob variables.  It's a space-saving
  701.      * mechanism for image data.  Rather than defining the image data
  702.      * for every plane of the RastPort, you need define data only
  703.      * for the planes that are not entirely zero or one.  As you
  704.      * define your Imagery, you will often find that most of the planes
  705.      * ARE just as color selectors.  For instance, if you're designing
  706.      * a two-color Gadget to use colors two and three, and the Gadget
  707.      * will reside in a five-plane display, bit plane zero of your
  708.      * imagery would be all ones, bit plane one would have data that
  709.      * describes the imagery, and bit planes two through four would be
  710.      * all zeroes.  Using these flags allows you to avoid wasting all
  711.      * that memory in this way:  first, you specify which planes you
  712.      * want your data to appear in using the PlanePick variable.  For
  713.      * each bit set in the variable, the next "plane" of your image
  714.      * data is blitted to the display.  For each bit clear in this
  715.      * variable, the corresponding bit in PlaneOnOff is examined.
  716.      * If that bit is clear, a "plane" of zeroes will be used.
  717.      * If the bit is set, ones will go out instead.  So, for our example:
  718.      *   Gadget.PlanePick = $02;
  719.      *   Gadget.PlaneOnOff = $01;
  720.      * Note that this also allows for generic Gadgets, like the
  721.      * System Gadgets, which will work in any number of bit planes.
  722.      * Note also that if you want an Image that is only a filled
  723.      * rectangle, you can get this by setting PlanePick to zero
  724.      * (pick no planes of data) and set PlaneOnOff to describe the pen
  725.      * color of the rectangle.
  726.      }
  727.  
  728.         PlanePick,
  729.         PlaneOnOff      : Byte;
  730.  
  731.     { if the NextImage variable is not NULL, Intuition presumes that
  732.      * it points to another Image structure with another Image to be
  733.      * rendered
  734.      }
  735.  
  736.         NextImage       : pImage;
  737.     end;
  738.  
  739.  
  740. { New for V39, Intuition supports the IESUBCLASS_NEWTABLET subclass
  741.  * of the IECLASS_NEWPOINTERPOS event.  The ie_EventAddress of such
  742.  * an event points to a TabletData structure (see below).
  743.  *
  744.  * The TabletData structure contains certain elements including a taglist.
  745.  * The taglist can be used for special tablet parameters.  A tablet driver
  746.  * should include only those tag-items the tablet supports.  An application
  747.  * can listen for any tag-items that interest it.  Note: an application
  748.  * must set the WA_TabletMessages attribute to TRUE to receive this
  749.  * extended information in its IntuiMessages.
  750.  *
  751.  * The definitions given here MUST be followed.  Pay careful attention
  752.  * to normalization and the interpretation of signs.
  753.  *
  754.  * TABLETA_TabletZ:  the current value of the tablet in the Z direction.
  755.  * This unsigned value should typically be in the natural units of the
  756.  * tablet.  You should also provide TABLETA_RangeZ.
  757.  *
  758.  * TABLETA_RangeZ:  the maximum value of the tablet in the Z direction.
  759.  * Normally specified along with TABLETA_TabletZ, this allows the
  760.  * application to scale the actual Z value across its range.
  761.  *
  762.  * TABLETA_AngleX:  the angle of rotation or tilt about the X-axis.  This
  763.  * number should be normalized to fill a signed long Longint.  Positive
  764.  * values imply a clockwise rotation about the X-axis when viewing
  765.  * from +X towards the origin.
  766.  *
  767.  * TABLETA_AngleY:  the angle of rotation or tilt about the Y-axis.  This
  768.  * number should be normalized to fill a signed long Longint.  Positive
  769.  * values imply a clockwise rotation about the Y-axis when viewing
  770.  * from +Y towards the origin.
  771.  *
  772.  * TABLETA_AngleZ:  the angle of rotation or tilt about the Z axis.  This
  773.  * number should be normalized to fill a signed long Longint.  Positive
  774.  * values imply a clockwise rotation about the Z-axis when viewing
  775.  * from +Z towards the origin.
  776.  *
  777.  *      Note: a stylus that supports tilt should use the TABLETA_AngleX
  778.  *      and TABLETA_AngleY attributes.  Tilting the stylus so the tip
  779.  *      points towards increasing or decreasing X is actually a rotation
  780.  *      around the Y-axis.  Thus, if the stylus tip points towards
  781.  *      positive X, then that tilt is represented as a negative
  782.  *      TABLETA_AngleY.  Likewise, if the stylus tip points towards
  783.  *      positive Y, that tilt is represented by positive TABLETA_AngleX.
  784.  *
  785.  * TABLETA_Pressure:  the pressure reading of the stylus.  The pressure
  786.  * should be normalized to fill a signed long Longint.  Typical devices
  787.  * won't generate negative pressure, but the possibility is not precluded.
  788.  * The pressure threshold which is considered to cause a button-click is
  789.  * expected to be set in a Preferences program supplied by the tablet
  790.  * vendor.  The tablet driver would send IECODE_LBUTTON-type events as
  791.  * the pressure crossed that threshold.
  792.  *
  793.  * TABLETA_ButtonBits:  ti_Data is a long Longint whose bits are to
  794.  * be interpreted at the state of the first 32 buttons of the tablet.
  795.  *
  796.  * TABLETA_InProximity:  ti_Data is a boolean.  For tablets that support
  797.  * proximity, they should send the (TABLETA_InProximity,FALSE) tag item
  798.  * when the stylus is out of proximity.  One possible use we can forsee
  799.  * is a mouse-blanking commodity which keys off this to blank the
  800.  * mouse.  When this tag is absent, the stylus is assumed to be
  801.  * in proximity.
  802.  *
  803.  * TABLETA_ResolutionX:  ti_Data is an unsigned long Longint which
  804.  * is the x-axis resolution in dots per inch.
  805.  *
  806.  * TABLETA_ResolutionY:  ti_Data is an unsigned long Longint which
  807.  * is the y-axis resolution in dots per inch.
  808.  }
  809.  
  810. const
  811.  TABLETA_Dummy          = (TAG_USER + $3A000)  ;
  812.  TABLETA_TabletZ        = (TABLETA_Dummy + $01);
  813.  TABLETA_RangeZ         = (TABLETA_Dummy + $02);
  814.  TABLETA_AngleX         = (TABLETA_Dummy + $03);
  815.  TABLETA_AngleY         = (TABLETA_Dummy + $04);
  816.  TABLETA_AngleZ         = (TABLETA_Dummy + $05);
  817.  TABLETA_Pressure       = (TABLETA_Dummy + $06);
  818.  TABLETA_ButtonBits     = (TABLETA_Dummy + $07);
  819.  TABLETA_InProximity    = (TABLETA_Dummy + $08);
  820.  TABLETA_ResolutionX    = (TABLETA_Dummy + $09);
  821.  TABLETA_ResolutionY    = (TABLETA_Dummy + $0A);
  822.  
  823. { If your window sets WA_TabletMessages to TRUE, then it will receive
  824.  * extended IntuiMessages (struct ExtIntuiMessage) whose eim_TabletData
  825.  * field points at a TabletData structure.  This structure contains
  826.  * additional information about the input event.
  827.  }
  828.  
  829. Type
  830.  pTabletData = ^tTabletData;
  831.  tTabletData = record
  832.     { Sub-pixel position of tablet, in screen coordinates,
  833.      * scaled to fill a UWORD fraction:
  834.      }
  835.     td_XFraction, td_YFraction  : WORD;
  836.  
  837.     { Current tablet coordinates along each axis: }
  838.     td_TabletX, td_TabletY      : ULONG;
  839.  
  840.     { Tablet range along each axis.  For example, if td_TabletX
  841.      * can take values 0-999, td_RangeX should be 1000.
  842.      }
  843.     td_RangeX, td_RangeY        : ULONG;
  844.  
  845.     { Pointer to tag-list of additional tablet attributes.
  846.      * See <intuition/intuition.h> for the tag values.
  847.      }
  848.     td_TagList                  : pTagItem;
  849.  end;
  850.  
  851. { If a tablet driver supplies a hook for ient_CallBack, it will be
  852.  * invoked in the standard hook manner.  A0 will point to the Hook
  853.  * itself, A2 will point to the InputEvent that was sent, and
  854.  * A1 will point to a TabletHookData structure.  The InputEvent's
  855.  * ie_EventAddress field points at the IENewTablet structure that
  856.  * the driver supplied.
  857.  *
  858.  * Based on the thd_Screen, thd_Width, and thd_Height fields, the driver
  859.  * should scale the ient_TabletX and ient_TabletY fields and store the
  860.  * result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and
  861.  * ient_ScaledYFraction.
  862.  *
  863.  * The tablet hook must currently return NULL.  This is the only
  864.  * acceptable return-value under V39.
  865.  }
  866.  
  867.  pTabletHookData = ^tTabletHookData;
  868.  tTabletHookData = record
  869.     { Pointer to the active screen:
  870.      * Note: if there are no open screens, thd_Screen will be NULL.
  871.      * thd_Width and thd_Height will then describe an NTSC 64$400
  872.      * screen.  Please scale accordingly.
  873.      }
  874.     thd_Screen      : Pointer;
  875.  
  876.     { The width and height (measured in pixels of the active screen)
  877.      * that your are to scale to:
  878.      }
  879.     thd_Width,
  880.     thd_Height      : ULONG;
  881.  
  882.     { Non-zero if the screen or something about the screen
  883.      * changed since the last time you were invoked:
  884.      }
  885.     thd_ScreenChanged   : Longint;
  886.  end;
  887.  
  888.  
  889. { ======================================================================== }
  890. { === IntuiMessage ======================================================= }
  891. { ======================================================================== }
  892.  
  893. Type
  894.  
  895.     pIntuiMessage = ^tIntuiMessage;
  896.     tIntuiMessage = record
  897.         ExecMessage     : tMessage;
  898.  
  899.     { the Class bits correspond directly with the IDCMP Flags, except for the
  900.      * special bit LONELYMESSAGE (defined below)
  901.      }
  902.  
  903.         IClass           : ULONG;
  904.  
  905.     { the Code field is for special values like MENU number }
  906.  
  907.         Code            : Word;
  908.  
  909.     { the Qualifier field is a copy of the current InputEvent's Qualifier }
  910.  
  911.         Qualifier       : Word;
  912.  
  913.     { IAddress contains particular addresses for Intuition functions, like
  914.      * the pointer to the Gadget or the Screen
  915.      }
  916.  
  917.         IAddress        : Pointer;
  918.  
  919.     { when getting mouse movement reports, any event you get will have the
  920.      * the mouse coordinates in these variables.  the coordinates are relative
  921.      * to the upper-left corner of your Window (GIMMEZEROZERO notwithstanding)
  922.      }
  923.  
  924.         MouseX,
  925.         MouseY          : Integer;
  926.  
  927.     { the time values are copies of the current system clock time.  Micros
  928.      * are in units of microseconds, Seconds in seconds.
  929.      }
  930.  
  931.         Seconds,
  932.         Micros          : ULONG;
  933.  
  934.     { the IDCMPWindow variable will always have the Pointer of the Window of
  935.      * this IDCMP
  936.      }
  937.  
  938.         IDCMPWindow     : Pointer;
  939.  
  940.     { system-use variable }
  941.  
  942.         SpecialLink     : pIntuiMessage;
  943.     end;
  944.  
  945. { New for V39:
  946.  * All IntuiMessages are now slightly extended.  The ExtIntuiMessage
  947.  * structure has an additional field for tablet data, which is usually
  948.  * NULL.  If a tablet driver which is sending IESUBCLASS_NEWTABLET
  949.  * events is installed in the system, windows with the WA_TabletMessages
  950.  * property set will find that eim_TabletData points to the TabletData
  951.  * structure.  Applications must first check that this field is non-NULL;
  952.  * it will be NULL for certain kinds of message, including mouse activity
  953.  * generated from other than the tablet (i.e. the keyboard equivalents
  954.  * or the mouse itself).
  955.  *
  956.  * NEVER EVER examine any extended fields when running under pre-V39!
  957.  *
  958.  * NOTE: This structure is subject to grow in the future.  Making
  959.  * assumptions about its size is A BAD IDEA.
  960.  }
  961.  
  962.  pExtIntuiMessage = ^tExtIntuiMessage;
  963.  tExtIntuiMessage = record
  964.     eim_IntuiMessage  : tIntuiMessage;
  965.     eim_TabletData    : pTabletData;
  966.  end;
  967.  
  968.  
  969. CONST
  970.  
  971. { --- IDCMP Classes ------------------------------------------------------ }
  972. { Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
  973.  * Manual for full details on the IDCMP classes.
  974.  }
  975.  IDCMP_SIZEVERIFY      =  $00000001;
  976.  IDCMP_NEWSIZE         =  $00000002;
  977.  IDCMP_REFRESHWINDOW   =  $00000004;
  978.  IDCMP_MOUSEBUTTONS    =  $00000008;
  979.  IDCMP_MOUSEMOVE       =  $00000010;
  980.  IDCMP_GADGETDOWN      =  $00000020;
  981.  IDCMP_GADGETUP        =  $00000040;
  982.  IDCMP_REQSET          =  $00000080;
  983.  IDCMP_MENUPICK        =  $00000100;
  984.  IDCMP_CLOSEWINDOW     =  $00000200;
  985.  IDCMP_RAWKEY          =  $00000400;
  986.  IDCMP_REQVERIFY       =  $00000800;
  987.  IDCMP_REQCLEAR        =  $00001000;
  988.  IDCMP_MENUVERIFY      =  $00002000;
  989.  IDCMP_NEWPREFS        =  $00004000;
  990.  IDCMP_DISKINSERTED    =  $00008000;
  991.  IDCMP_DISKREMOVED     =  $00010000;
  992.  IDCMP_WBENCHMESSAGE   =  $00020000;  {  System use only         }
  993.  IDCMP_ACTIVEWINDOW    =  $00040000;
  994.  IDCMP_INACTIVEWINDOW  =  $00080000;
  995.  IDCMP_DELTAMOVE       =  $00100000;
  996.  IDCMP_VANILLAKEY      =  $00200000;
  997.  IDCMP_INTUITICKS      =  $00400000;
  998. {  for notifications from "boopsi" gadgets               }
  999.  IDCMP_IDCMPUPDATE     =  $00800000;  { new for V36      }
  1000. { for getting help key report during menu session        }
  1001.  IDCMP_MENUHELP        =  $01000000;  { new for V36      }
  1002. { for notification of any move/size/zoom/change window   }
  1003.  IDCMP_CHANGEWINDOW    =  $02000000;  { new for V36      }
  1004.  IDCMP_GADGETHELP      =  $04000000;  { new for V39      }
  1005.  
  1006. { NOTEZ-BIEN:                          $80000000 is reserved for internal use   }
  1007.  
  1008. { the IDCMP Flags do not use this special bit, which is cleared when
  1009.  * Intuition sends its special message to the Task, and set when Intuition
  1010.  * gets its Message back from the Task.  Therefore, I can check here to
  1011.  * find out fast whether or not this Message is available for me to send
  1012.  }
  1013.  IDCMP_LONELYMESSAGE   =  $80000000;
  1014.  
  1015.  
  1016. { --- IDCMP Codes -------------------------------------------------------- }
  1017. { This group of codes is for the IDCMP_CHANGEWINDOW message }
  1018.  CWCODE_MOVESIZE = $0000;  { Window was moved and/or sized }
  1019.  CWCODE_DEPTH    = $0001;  { Window was depth-arranged (new for V39) }
  1020.  
  1021. { This group of codes is for the IDCMP_MENUVERIFY function }
  1022.  MENUHOT       =  $0001;  { IntuiWants verification OR MENUCANCEL    }
  1023.  MENUCANCEL    =  $0002;  { HOT Reply of this cancels Menu operation }
  1024.  MENUWAITING   =  $0003;  { Intuition simply wants a ReplyMsg() ASAP }
  1025.  
  1026. { These are internal tokens to represent state of verification attempts
  1027.  * shown here as a clue.
  1028.  }
  1029.  OKOK          =  MENUHOT; { guy didn't care                      }
  1030.  OKABORT       =  $0004;  { window rendered question moot        }
  1031.  OKCANCEL      =  MENUCANCEL; { window sent cancel reply          }
  1032.  
  1033. { This group of codes is for the IDCMP_WBENCHMESSAGE messages }
  1034.  WBENCHOPEN    =  $0001;
  1035.  WBENCHCLOSE   =  $0002;
  1036.  
  1037.  
  1038. { A data structure common in V36 Intuition processing  }
  1039. Type
  1040.    pIBox = ^tIBox;
  1041.    tIBox = record
  1042.     Left,
  1043.     Top,
  1044.     Width,
  1045.     Height : Integer;
  1046.    END;
  1047.  
  1048.  
  1049. { ======================================================================== }
  1050. { === Window ============================================================= }
  1051. { ======================================================================== }
  1052.  
  1053. Type
  1054.  
  1055.     pWindow = ^tWindow;
  1056.     tWindow = record
  1057.         NextWindow      : pWindow;      { for the linked list in a screen }
  1058.  
  1059.         LeftEdge,
  1060.         TopEdge         : Integer;        { screen dimensions of window }
  1061.         Width,
  1062.         Height          : Integer;        { screen dimensions of window }
  1063.  
  1064.         MouseY,
  1065.         MouseX          : Integer;        { relative to upper-left of window }
  1066.  
  1067.         MinWidth,
  1068.         MinHeight       : Integer;        { minimum sizes }
  1069.         MaxWidth,
  1070.         MaxHeight       : Word;        { maximum sizes }
  1071.  
  1072.         Flags           : ULONG;      { see below for defines }
  1073.  
  1074.         MenuStrip       : pMenu;      { the strip of Menu headers }
  1075.  
  1076.         Title           : STRPTR;       { the title text for this window }
  1077.  
  1078.         FirstRequest    : pRequester; { all active Requesters }
  1079.  
  1080.         DMRequest       : pRequester; { double-click Requester }
  1081.  
  1082.         ReqCount        : Integer;        { count of reqs blocking Window }
  1083.  
  1084.         WScreen         : Pointer;      { this Window's Screen }
  1085.         RPort           : pRastPort;  { this Window's very own RastPort }
  1086.  
  1087.     { the border variables describe the window border.   If you specify
  1088.      * GIMMEZEROZERO when you open the window, then the upper-left of the
  1089.      * ClipRect for this window will be upper-left of the BitMap (with correct
  1090.      * offsets when in SuperBitMap mode; you MUST select GIMMEZEROZERO when
  1091.      * using SuperBitMap).  If you don't specify ZeroZero, then you save
  1092.      * memory (no allocation of RastPort, Layer, ClipRect and associated
  1093.      * Bitmaps), but you also must offset all your writes by BorderTop,
  1094.      * BorderLeft and do your own mini-clipping to prevent writing over the
  1095.      * system gadgets
  1096.      }
  1097.  
  1098.         BorderLeft,
  1099.         BorderTop,
  1100.         BorderRight,
  1101.         BorderBottom    : Shortint;
  1102.         BorderRPort     : pRastPort;
  1103.  
  1104.  
  1105.     { You supply a linked-list of Gadgets for your Window.
  1106.      * This list DOES NOT include system gadgets.  You get the standard
  1107.      * window system gadgets by setting flag-bits in the variable Flags (see
  1108.      * the bit definitions below)
  1109.      }
  1110.  
  1111.         FirstGadget     : pGadget;
  1112.  
  1113.     { these are for opening/closing the windows }
  1114.  
  1115.         Parent,
  1116.         Descendant      : pWindow;
  1117.  
  1118.     { sprite data information for your own Pointer
  1119.      * set these AFTER you Open the Window by calling SetPointer()
  1120.      }
  1121.  
  1122.         _Pointer         : Pointer;      { sprite data }
  1123.         PtrHeight       : Shortint;         { sprite height (not including sprite padding) }
  1124.         PtrWidth        : Shortint;         { sprite width (must be less than or equal to 16) }
  1125.         XOffset,
  1126.         YOffset         : Shortint;         { sprite offsets }
  1127.  
  1128.     { the IDCMP Flags and User's and Intuition's Message Ports }
  1129.         IDCMPFlags      : ULONG;      { User-selected flags }
  1130.         UserPort,
  1131.         WindowPort      : pMsgPort;
  1132.         MessageKey      : pIntuiMessage;
  1133.  
  1134.         DetailPen,
  1135.         BlockPen        : Byte; { for bar/border/gadget rendering }
  1136.  
  1137.     { the CheckMark is a pointer to the imagery that will be used when
  1138.      * rendering MenuItems of this Window that want to be checkmarked
  1139.      * if this is equal to NULL, you'll get the default imagery
  1140.      }
  1141.  
  1142.         CheckMark       : pImage;
  1143.  
  1144.         ScreenTitle     : STRPTR; { if non-null, Screen title when Window is active }
  1145.  
  1146.     { These variables have the mouse coordinates relative to the
  1147.      * inner-Window of GIMMEZEROZERO Windows.  This is compared with the
  1148.      * MouseX and MouseY variables, which contain the mouse coordinates
  1149.      * relative to the upper-left corner of the Window, GIMMEZEROZERO
  1150.      * notwithstanding
  1151.      }
  1152.  
  1153.         GZZMouseX       : Integer;
  1154.         GZZMouseY       : Integer;
  1155.  
  1156.     { these variables contain the width and height of the inner-Window of
  1157.      * GIMMEZEROZERO Windows
  1158.      }
  1159.  
  1160.         GZZWidth        : Integer;
  1161.         GZZHeight       : Integer;
  1162.  
  1163.         ExtData         : Pointer;
  1164.  
  1165.         UserData        : Pointer;      { general-purpose pointer to User data extension }
  1166.  
  1167.     {* jimm: NEW: 11/18/85: this pointer keeps a duplicate of what
  1168.      * Window.RPort->Layer is _supposed_ to be pointing at
  1169.      }
  1170.  
  1171.         WLayer          : pLayer;
  1172.  
  1173.     { jimm: NEW 1.2: need to keep track of the font that
  1174.      * OpenWindow opened, in case user SetFont's into RastPort
  1175.      }
  1176.  
  1177.         IFont           : pTextFont;
  1178.     {* (V36) another flag word (the Flags field is used up).
  1179.      * At present, all flag values are system private.
  1180.      * Until further notice, you may not change nor use this field.
  1181.      *}
  1182.         MoreFlags       : ULONG;
  1183.  
  1184.     {**** Data beyond this point are Intuition Private.  DO NOT USE ****}
  1185.  
  1186.     end;
  1187.  
  1188. CONST
  1189. { --- Flags requested at OpenWindow() time by the application --------- }
  1190.  WFLG_SIZEGADGET   =  $00000001;  { include sizing system-gadget? }
  1191.  WFLG_DRAGBAR      =  $00000002;  { include dragging system-gadget? }
  1192.  WFLG_DEPTHGADGET  =  $00000004;  { include depth arrangement gadget? }
  1193.  WFLG_CLOSEGADGET  =  $00000008;  { include close-box system-gadget? }
  1194.  
  1195.  WFLG_SIZEBRIGHT   =  $00000010;  { size gadget uses right border }
  1196.  WFLG_SIZEBBOTTOM  =  $00000020;  { size gadget uses bottom border }
  1197.  
  1198. { --- refresh modes ------------------------------------------------------ }
  1199. { combinations of the WFLG_REFRESHBITS select the refresh type }
  1200.  WFLG_REFRESHBITS   = $000000C0;
  1201.  WFLG_SMART_REFRESH = $00000000;
  1202.  WFLG_SIMPLE_REFRESH= $00000040;
  1203.  WFLG_SUPER_BITMAP  = $00000080;
  1204.  WFLG_OTHER_REFRESH = $000000C0;
  1205.  
  1206.  WFLG_BACKDROP      = $00000100;  { this is a backdrop window }
  1207.  
  1208.  WFLG_REPORTMOUSE   = $00000200;  { to hear about every mouse move }
  1209.  
  1210.  WFLG_GIMMEZEROZERO = $00000400;  { a GimmeZeroZero window       }
  1211.  
  1212.  WFLG_BORDERLESS    = $00000800;  { to get a Window sans border }
  1213.  
  1214.  WFLG_ACTIVATE      = $00001000;  { when Window opens, it's Active }
  1215.  
  1216.  
  1217. { --- Other User Flags --------------------------------------------------- }
  1218.  WFLG_RMBTRAP       = $00010000;  { Catch RMB events for your own }
  1219.  WFLG_NOCAREREFRESH = $00020000;  { not to be bothered with REFRESH }
  1220.  
  1221. { - V36 new Flags which the programmer may specify in NewWindow.Flags  }
  1222.  WFLG_NW_EXTENDED   = $00040000;  { extension data provided      }
  1223.                                         { see struct ExtNewWindow      }
  1224.  
  1225. { - V39 new Flags which the programmer may specify in NewWindow.Flags  }
  1226.  WFLG_NEWLOOKMENUS  = $00200000;  { window has NewLook menus     }
  1227.  
  1228. { These flags are set only by Intuition.  YOU MAY NOT SET THEM YOURSELF! }
  1229.  WFLG_WINDOWACTIVE  = $00002000;  { this window is the active one }
  1230.  WFLG_INREQUEST     = $00004000;  { this window is in request mode }
  1231.  WFLG_MENUSTATE     = $00008000;  { Window is active with Menus on }
  1232.  WFLG_WINDOWREFRESH = $01000000;  { Window is currently refreshing }
  1233.  WFLG_WBENCHWINDOW  = $02000000;  { WorkBench tool ONLY Window }
  1234.  WFLG_WINDOWTICKED  = $04000000;  { only one timer tick at a time }
  1235.  
  1236. { --- V36 Flags to be set only by Intuition -------------------------  }
  1237.  WFLG_VISITOR       = $08000000;  { visitor window               }
  1238.  WFLG_ZOOMED        = $10000000;  { identifies "zoom state"      }
  1239.  WFLG_HASZOOM       = $20000000;  { windowhas a zoom gadget      }
  1240.  
  1241. { --- Other Window Values ---------------------------------------------- }
  1242.  DEFAULTMOUSEQUEUE  =     (5);     { no more mouse messages       }
  1243.  
  1244. { --- see struct IntuiMessage for the IDCMP Flag definitions ------------- }
  1245.  
  1246.  
  1247. { ======================================================================== }
  1248. { === NewWindow ========================================================== }
  1249. { ======================================================================== }
  1250.  
  1251. Type
  1252.  
  1253.     pNewWindow = ^tNewWindow;
  1254.     tNewWindow = record
  1255.         LeftEdge,
  1256.         TopEdge         : Integer;        { screen dimensions of window }
  1257.         Width,
  1258.         Height          : Integer;        { screen dimensions of window }
  1259.  
  1260.         DetailPen,
  1261.         BlockPen        : Byte;         { for bar/border/gadget rendering }
  1262.  
  1263.         IDCMPFlags      : ULONG;      { User-selected IDCMP flags }
  1264.  
  1265.         Flags           : ULONG;      { see Window struct for defines }
  1266.  
  1267.     { You supply a linked-list of Gadgets for your Window.
  1268.      *  This list DOES NOT include system Gadgets.  You get the standard
  1269.      *  system Window Gadgets by setting flag-bits in the variable Flags (see
  1270.      *  the bit definitions under the Window structure definition)
  1271.      }
  1272.  
  1273.         FirstGadget     : pGadget;
  1274.  
  1275.     { the CheckMark is a pointer to the imagery that will be used when
  1276.      * rendering MenuItems of this Window that want to be checkmarked
  1277.      * if this is equal to NULL, you'll get the default imagery
  1278.      }
  1279.  
  1280.         CheckMark       : pImage;
  1281.  
  1282.         Title           : STRPTR;  { the title text for this window }
  1283.  
  1284.     { the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  1285.      * want this Window to open in it.  If so, you pass the Pointer of the
  1286.      * Custom Screen structure in this variable.  Otherwise, this variable
  1287.      * is ignored and doesn't have to be initialized.
  1288.      }
  1289.  
  1290.         Screen          : Pointer;
  1291.  
  1292.     { SUPER_BITMAP Window?  If so, put the Pointer of your BitMap structure
  1293.      * in this variable.  If not, this variable is ignored and doesn't have
  1294.      * to be initialized
  1295.      }
  1296.  
  1297.         BitMap          : pBitMap;
  1298.  
  1299.     { the values describe the minimum and maximum sizes of your Windows.
  1300.      * these matter only if you've chosen the WINDOWSIZING Gadget option,
  1301.      * which means that you want to let the User to change the size of
  1302.      * this Window.  You describe the minimum and maximum sizes that the
  1303.      * Window can grow by setting these variables.  You can initialize
  1304.      * any one these to zero, which will mean that you want to duplicate
  1305.      * the setting for that dimension (if MinWidth == 0, MinWidth will be
  1306.      * set to the opening Width of the Window).
  1307.      * You can change these settings later using SetWindowLimits().
  1308.      * If you haven't asked for a SIZING Gadget, you don't have to
  1309.      * initialize any of these variables.
  1310.      }
  1311.  
  1312.         MinWidth,
  1313.         MinHeight       : Integer;        { minimums }
  1314.         MaxWidth,
  1315.         MaxHeight       : Word;        { maximums }
  1316.  
  1317.     { the type variable describes the Screen in which you want this Window to
  1318.      * open.  The type value can either be CUSTOMSCREEN or one of the
  1319.      * system standard Screen Types such as WBENCHSCREEN.  See the
  1320.      * type definitions under the Screen structure
  1321.      }
  1322.  
  1323.         WType           : Word;        { is "Type" in C includes }
  1324.     end;
  1325.  
  1326.  
  1327. { The following structure is the future NewWindow.  Compatibility
  1328.  * issues require that the size of NewWindow not change.
  1329.  * Data in the common part (NewWindow) indicates the the extension
  1330.  * fields are being used.
  1331.  * NOTE WELL: This structure may be subject to future extension.
  1332.  * Writing code depending on its size is not allowed.
  1333.  }
  1334.    pExtNewWindow = ^tExtNewWindow;
  1335.    tExtNewWindow = record
  1336.     LeftEdge, TopEdge : Integer;
  1337.     Width, Height : Integer;
  1338.  
  1339.     DetailPen, BlockPen : Byte;
  1340.     IDCMPFlags    : ULONG;
  1341.     Flags         : ULONG;
  1342.     FirstGadget   : pGadget;
  1343.  
  1344.     CheckMark     : pImage;
  1345.  
  1346.     Title         : STRPTR;
  1347.     WScreen       : Pointer;
  1348.     WBitMap       : pBitMap;
  1349.  
  1350.     MinWidth, MinHeight : Integer;
  1351.     MaxWidth, MaxHeight : Word;
  1352.  
  1353.     { the type variable describes the Screen in which you want this Window to
  1354.      * open.  The type value can either be CUSTOMSCREEN or one of the
  1355.      * system standard Screen Types such as WBENCHSCREEN.  See the
  1356.      * type definitions under the Screen structure.
  1357.      * A new possible value for this field is PUBLICSCREEN, which
  1358.      * defines the window as a 'visitor' window.  See below for
  1359.      * additional information provided.
  1360.      }
  1361.     WType  : Word;
  1362.  
  1363.     { ------------------------------------------------------- *
  1364.      * extensions for V36
  1365.      * if the NewWindow Flag value WFLG_NW_EXTENDED is set, then
  1366.      * this field is assumed to point to an array ( or chain of arrays)
  1367.      * of TagItem structures.  See also ExtNewScreen for another
  1368.      * use of TagItems to pass optional data.
  1369.      *
  1370.      * see below for tag values and the corresponding data.
  1371.      }
  1372.     Extension : pTagItem;
  1373.   END;
  1374.  
  1375. {
  1376.  * The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow.
  1377.  * They are values in a TagItem array passed as extension/replacement
  1378.  * values for the data in NewWindow.  OpenWindowTagList() can actually
  1379.  * work well with a NULL NewWindow pointer.
  1380.  }
  1381. CONST
  1382.  WA_Dummy     =   (TAG_USER + 99); { $80000063   }
  1383.  
  1384. { these tags simply override NewWindow parameters }
  1385.  WA_Left               =  (WA_Dummy + $01);
  1386.  WA_Top                =  (WA_Dummy + $02);
  1387.  WA_Width              =  (WA_Dummy + $03);
  1388.  WA_Height             =  (WA_Dummy + $04);
  1389.  WA_DetailPen          =  (WA_Dummy + $05);
  1390.  WA_BlockPen           =  (WA_Dummy + $06);
  1391.  WA_IDCMP              =  (WA_Dummy + $07);
  1392.                         { "bulk" initialization of NewWindow.Flags }
  1393.  WA_Flags              =  (WA_Dummy + $08);
  1394.  WA_Gadgets            =  (WA_Dummy + $09);
  1395.  WA_Checkmark          =  (WA_Dummy + $0A);
  1396.  WA_Title              =  (WA_Dummy + $0B);
  1397.                         { means you don't have to call SetWindowTitles
  1398.                          * after you open your window
  1399.                          }
  1400.  WA_ScreenTitle        =  (WA_Dummy + $0C);
  1401.  WA_CustomScreen       =  (WA_Dummy + $0D);
  1402.  WA_SuperBitMap        =  (WA_Dummy + $0E);
  1403.                         { also implies WFLG_SUPER_BITMAP property      }
  1404.  WA_MinWidth           =  (WA_Dummy + $0F);
  1405.  WA_MinHeight          =  (WA_Dummy + $10);
  1406.  WA_MaxWidth           =  (WA_Dummy + $11);
  1407.  WA_MaxHeight          =  (WA_Dummy + $12);
  1408.  
  1409. { The following are specifications for new features    }
  1410.  
  1411.  WA_InnerWidth         =  (WA_Dummy + $13);
  1412.  WA_InnerHeight        =  (WA_Dummy + $14);
  1413.                         { You can specify the dimensions of the interior
  1414.                          * region of your window, independent of what
  1415.                          * the border widths will be.  You probably want
  1416.                          * to also specify WA_AutoAdjust to allow
  1417.                          * Intuition to move your window or even
  1418.                          * shrink it so that it is completely on screen.
  1419.                          }
  1420.  
  1421.  WA_PubScreenName      =  (WA_Dummy + $15);
  1422.                         { declares that you want the window to open as
  1423.                          * a visitor on the public screen whose name is
  1424.                          * pointed to by (UBYTE *) ti_Data
  1425.                          }
  1426.  WA_PubScreen          =  (WA_Dummy + $16);
  1427.                         { open as a visitor window on the public screen
  1428.                          * whose Pointer is in (struct Screen *) ti_Data.
  1429.                          * To ensure that this screen remains open, you
  1430.                          * should either be the screen's owner, have a
  1431.                          * window open on the screen, or use LockPubScreen().
  1432.                          }
  1433.  WA_PubScreenFallBack  =  (WA_Dummy + $17);
  1434.                         { A Boolean, specifies whether a visitor window
  1435.                          * should "fall back" to the default public screen
  1436.                          * (or Workbench) if the named public screen isn't
  1437.                          * available
  1438.                          }
  1439.  WA_WindowName         =  (WA_Dummy + $18);
  1440.                         { not implemented      }
  1441.  WA_Colors             =  (WA_Dummy + $19);
  1442.                         { a ColorSpec array for colors to be set
  1443.                          * when this window is active.  This is not
  1444.                          * implemented, and may not be, since the default
  1445.                          * values to restore would be hard to track.
  1446.                          * We'd like to at least support per-window colors
  1447.                          * for the mouse pointer sprite.
  1448.                          }
  1449.  WA_Zoom       =  (WA_Dummy + $1A);
  1450.                         { ti_Data points to an array of four WORD's,
  1451.                          * the initial Left/Top/Width/Height values of
  1452.                          * the "alternate" zoom position/dimensions.
  1453.                          * It also specifies that you want a Zoom gadget
  1454.                          * for your window, whether or not you have a
  1455.                          * sizing gadget.
  1456.                          }
  1457.  WA_MouseQueue         =  (WA_Dummy + $1B);
  1458.                         { ti_Data contains initial value for the mouse
  1459.                          * message backlog limit for this window.
  1460.                          }
  1461.  WA_BackFill           =  (WA_Dummy + $1C);
  1462.                         { unimplemented at present: provides a "backfill
  1463.                          * hook" for your window's layer.
  1464.                          }
  1465.  WA_RptQueue           =  (WA_Dummy + $1D);
  1466.                         { initial value of repeat key backlog limit    }
  1467.  
  1468.     { These Boolean tag items are alternatives to the NewWindow.Flags
  1469.      * boolean flags with similar names.
  1470.      }
  1471.  WA_SizeGadget         =  (WA_Dummy + $1E);
  1472.  WA_DragBar            =  (WA_Dummy + $1F);
  1473.  WA_DepthGadget        =  (WA_Dummy + $20);
  1474.  WA_CloseGadget        =  (WA_Dummy + $21);
  1475.  WA_Backdrop           =  (WA_Dummy + $22);
  1476.  WA_ReportMouse        =  (WA_Dummy + $23);
  1477.  WA_NoCareRefresh      =  (WA_Dummy + $24);
  1478.  WA_Borderless         =  (WA_Dummy + $25);
  1479.  WA_Activate           =  (WA_Dummy + $26);
  1480.  WA_RMBTrap            =  (WA_Dummy + $27);
  1481.  WA_WBenchWindow       =  (WA_Dummy + $28);       { PRIVATE!! }
  1482.  WA_SimpleRefresh      =  (WA_Dummy + $29);
  1483.                         { only specify if TRUE }
  1484.  WA_SmartRefresh       =  (WA_Dummy + $2A);
  1485.                         { only specify if TRUE }
  1486.  WA_SizeBRight         =  (WA_Dummy + $2B);
  1487.  WA_SizeBBottom        =  (WA_Dummy + $2C);
  1488.  
  1489.     { New Boolean properties   }
  1490.  WA_AutoAdjust         =  (WA_Dummy + $2D);
  1491.                         { shift or squeeze the window's position and
  1492.                          * dimensions to fit it on screen.
  1493.                          }
  1494.  
  1495.  WA_GimmeZeroZero      =  (WA_Dummy + $2E);
  1496.                         { equiv. to NewWindow.Flags WFLG_GIMMEZEROZERO }
  1497.  
  1498. { New for V37: WA_MenuHelp (ignored by V36) }
  1499.  WA_MenuHelp           =  (WA_Dummy + $2F);
  1500.                         { Enables IDCMP_MENUHELP:  Pressing HELP during menus
  1501.                          * will return IDCMP_MENUHELP message.
  1502.                          }
  1503.  
  1504. { New for V39:  (ignored by V37 and earlier) }
  1505.  WA_NewLookMenus       =  (WA_Dummy + $30);
  1506.                         { Set to TRUE if you want NewLook menus }
  1507.  WA_AmigaKey           =  (WA_Dummy + $31);
  1508.                         { Pointer to image for Amiga-key equiv in menus }
  1509.  WA_NotifyDepth        =  (WA_Dummy + $32);
  1510.                         { Requests IDCMP_CHANGEWINDOW message when
  1511.                          * window is depth arranged
  1512.                          * (imsg->Code = CWCODE_DEPTH)
  1513.                          }
  1514.  
  1515. { WA_Dummy + $33 is obsolete }
  1516.  
  1517.  WA_Pointer            =  (WA_Dummy + $34);
  1518.                         { Allows you to specify a custom pointer
  1519.                          * for your window.  ti_Data points to a
  1520.                          * pointer object you obtained via
  1521.                          * "pointerclass". NULL signifies the
  1522.                          * default pointer.
  1523.                          * This tag may be passed to OpenWindowTags()
  1524.                          * or SetWindowPointer().
  1525.                          }
  1526.  
  1527.  WA_BusyPointer        =  (WA_Dummy + $35);
  1528.                         { ti_Data is boolean.  Set to TRUE to
  1529.                          * request the standard busy pointer.
  1530.                          * This tag may be passed to OpenWindowTags()
  1531.                          * or SetWindowPointer().
  1532.                          }
  1533.  
  1534.  WA_PointerDelay       =  (WA_Dummy + $36);
  1535.                         { ti_Data is boolean.  Set to TRUE to
  1536.                          * request that the changing of the
  1537.                          * pointer be slightly delayed.  The change
  1538.                          * will be called off if you call NewSetPointer()
  1539.                          * before the delay expires.  This allows
  1540.                          * you to post a busy-pointer even if you think
  1541.                          * the busy-time may be very Word, without
  1542.                          * fear of a flashing pointer.
  1543.                          * This tag may be passed to OpenWindowTags()
  1544.                          * or SetWindowPointer().
  1545.                          }
  1546.  
  1547.  WA_TabletMessages     =  (WA_Dummy + $37);
  1548.                         { ti_Data is a boolean.  Set to TRUE to
  1549.                          * request that tablet information be included
  1550.                          * in IntuiMessages sent to your window.
  1551.                          * Requires that something (i.e. a tablet driver)
  1552.                          * feed IESUBCLASS_NEWTABLET InputEvents into
  1553.                          * the system.  For a pointer to the TabletData,
  1554.                          * examine the ExtIntuiMessage->eim_TabletData
  1555.                          * field.  It is UNSAFE to check this field
  1556.                          * when running on pre-V39 systems.  It's always
  1557.                          * safe to check this field under V39 and up,
  1558.                          * though it may be NULL.
  1559.                          }
  1560.  
  1561.  WA_HelpGroup          =  (WA_Dummy + $38);
  1562.                         { When the active window has gadget help enabled,
  1563.                          * other windows of the same HelpGroup number
  1564.                          * will also get GadgetHelp.  This allows GadgetHelp
  1565.                          * to work for multi-windowed applications.
  1566.                          * Use GetGroupID() to get an ID number.  Pass
  1567.                          * this number as ti_Data to all your windows.
  1568.                          * See also the HelpControl() function.
  1569.                          }
  1570.  
  1571.  WA_HelpGroupWindow    =  (WA_Dummy + $39);
  1572.                         { When the active window has gadget help enabled,
  1573.                          * other windows of the same HelpGroup will also get
  1574.                          * GadgetHelp.  This allows GadgetHelp to work
  1575.                          * for multi-windowed applications.  As an alternative
  1576.                          * to WA_HelpGroup, you can pass a pointer to any
  1577.                          * other window of the same group to join its help
  1578.                          * group.  Defaults to NULL, which has no effect.
  1579.                          * See also the HelpControl() function.
  1580.                          }
  1581.  
  1582.  
  1583. { HelpControl() flags:
  1584.  *
  1585.  * HC_GADGETHELP - Set this flag to enable Gadget-Help for one or more
  1586.  * windows.
  1587.  }
  1588.  
  1589.  HC_GADGETHELP  = 1;
  1590.  
  1591.  
  1592. { ======================================================================== }
  1593. { === Remember =========================================================== }
  1594. { ======================================================================== }
  1595. { this structure is used for remembering what memory has been allocated to
  1596.  * date by a given routine, so that a premature abort or systematic exit
  1597.  * can deallocate memory cleanly, easily, and completely
  1598.  }
  1599.  
  1600. Type
  1601.  
  1602.     pRemember = ^tRemember;
  1603.     tRemember = record
  1604.         NextRemember    : pRemember;
  1605.         RememberSize    : ULONG;
  1606.         Memory          : Pointer;
  1607.     end;
  1608.  
  1609.  
  1610. { === Color Spec ====================================================== }
  1611. { How to tell Intuition about RGB values for a color table entry. }
  1612.  
  1613.   pColorSpec = ^tColorSpec;
  1614.   tColorSpec = record
  1615.     ColorIndex  : Integer;     { -1 terminates an array of ColorSpec  }
  1616.     Red         : Word;     { only the _bottom_ 4 bits recognized }
  1617.     Green       : Word;     { only the _bottom_ 4 bits recognized }
  1618.     Blue        : Word;     { only the _bottom_ 4 bits recognized }
  1619.   END;
  1620.  
  1621. { === Easy Requester Specification ======================================= }
  1622. { see also autodocs for EasyRequest and BuildEasyRequest       }
  1623. { NOTE: This structure may grow in size in the future          }
  1624.  
  1625.    pEasyStruct = ^tEasyStruct;
  1626.    tEasyStruct = record
  1627.     es_StructSize   : ULONG;  { should be sizeof (struct EasyStruct )}
  1628.     es_Flags        : ULONG;  { should be 0 for now                  }
  1629.     es_Title        : STRPTR;   { title of requester window            }
  1630.     es_TextFormat   : STRPTR;   { 'printf' style formatting string     }
  1631.     es_GadgetFormat : STRPTR;   { 'printf' style formatting string   }
  1632.    END;
  1633.  
  1634.  
  1635.  
  1636. { ======================================================================== }
  1637. { === Miscellaneous ====================================================== }
  1638. { ======================================================================== }
  1639. CONST
  1640. { = MENU STUFF =========================================================== }
  1641.     NOMENU      = $001F;
  1642.     NOITEM      = $003F;
  1643.     NOSUB       = $001F;
  1644.     MENUNULL    = -1;
  1645.  
  1646.  
  1647. { = =RJ='s peculiarities ================================================= }
  1648.  
  1649. { these defines are for the COMMSEQ and CHECKIT menu stuff.  If CHECKIT,
  1650.  * I'll use a generic Width (for all resolutions) for the CheckMark.
  1651.  * If COMMSEQ, likewise I'll use this generic stuff
  1652.  }
  1653.  
  1654.     CHECKWIDTH          = 19;
  1655.     COMMWIDTH           = 27;
  1656.     LOWCHECKWIDTH       = 13;
  1657.     LOWCOMMWIDTH        = 16;
  1658.  
  1659. { these are the AlertNumber defines.  if you are calling DisplayAlert()
  1660.  * the AlertNumber you supply must have the ALERT_TYPE bits set to one
  1661.  * of these patterns
  1662.  }
  1663.  
  1664.     ALERT_TYPE          = $80000000;
  1665.     RECOVERY_ALERT      = $00000000;    { the system can recover from this }
  1666.     DEADEND_ALERT       = $80000000;    { no recovery possible, this is it }
  1667.  
  1668.  
  1669. { When you're defining IntuiText for the Positive and Negative Gadgets
  1670.  * created by a call to AutoRequest(), these defines will get you
  1671.  * reasonable-looking text.  The only field without a define is the IText
  1672.  * field; you decide what text goes with the Gadget
  1673.  }
  1674.  
  1675.     AUTOFRONTPEN        = 0;
  1676.     AUTOBACKPEN         = 1;
  1677.     AUTODRAWMODE        = JAM2;
  1678.     AUTOLEFTEDGE        = 6;
  1679.     AUTOTOPEDGE         = 3;
  1680.  
  1681. { -
  1682.     AUTOITEXTFONT       = Nil;
  1683.     AUTONEXTTEXT        = Nil;
  1684. - }
  1685.  
  1686.  
  1687. { --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) ------------------- }
  1688.  
  1689.  
  1690.     SELECTUP            = IECODE_LBUTTON + IECODE_UP_PREFIX;
  1691.     SELECTDOWN          = IECODE_LBUTTON;
  1692.     MENUUP              = IECODE_RBUTTON + IECODE_UP_PREFIX;
  1693.     MENUDOWN            = IECODE_RBUTTON;
  1694.     ALTLEFT             = IEQUALIFIER_LALT;
  1695.     ALTRIGHT            = IEQUALIFIER_RALT;
  1696.     AMIGALEFT           = IEQUALIFIER_LCOMMAND;
  1697.     AMIGARIGHT          = IEQUALIFIER_RCOMMAND;
  1698.     AMIGAKEYS           = AMIGALEFT + AMIGARIGHT;
  1699.  
  1700.     CURSORUP            = $4C;
  1701.     CURSORLEFT          = $4F;
  1702.     CURSORRIGHT         = $4E;
  1703.     CURSORDOWN          = $4D;
  1704.     KEYCODE_Q           = $10;
  1705.     KEYCODE_X           = $32;
  1706.     KEYCODE_N           = $36;
  1707.     KEYCODE_M           = $37;
  1708.     KEYCODE_V           = $34;
  1709.     KEYCODE_B           = $35;
  1710.     KEYCODE_LESS        = $38;
  1711.     KEYCODE_GREATER     = $39;
  1712.  
  1713. { these are the display modes for which we have corresponding parameter
  1714.  *  settings in the config arrays
  1715.  }
  1716. CONST
  1717.  DMODECOUNT    =  $0002;  { how many modes there are }
  1718.  HIRESPICK     =  $0000;
  1719.  LOWRESPICK    =  $0001;
  1720.  
  1721.  EVENTMAX = 10;             { size of event array }
  1722.  
  1723. { these are the system Gadget defines }
  1724.  RESCOUNT       = 2;
  1725.  HIRESGADGET    = 0;
  1726.  LOWRESGADGET   = 1;
  1727.  
  1728.  GADGETCOUNT    = 8;
  1729.  UPFRONTGADGET  = 0;
  1730.  DOWNBACKGADGET = 1;
  1731.  SIZEGADGET     = 2;
  1732.  CLOSEGADGET    = 3;
  1733.  DRAGGADGET     = 4;
  1734.  SUPFRONTGADGET = 5;
  1735.  SDOWNBACKGADGET= 6;
  1736.  SDRAGGADGET    = 7;
  1737.  
  1738.  
  1739. { ======================================================================== }
  1740. { === DrawInfo ========================================================= }
  1741. { ======================================================================== }
  1742.  
  1743. { This is a packet of information for graphics rendering.  It originates
  1744.  * with a Screen, and is gotten using GetScreenDrawInfo( screen );
  1745.  }
  1746.  
  1747. { If you find dri_Version >= DRI_VERSION, you know this structure
  1748.  * has at least the fields defined in this version of the include file
  1749.  }
  1750. CONST
  1751.  RI_VERSION  =    (1);     { obsolete, will be removed            }
  1752.  DRI_VERSION =    (1);
  1753.  
  1754. Type
  1755.  
  1756.  pDrawInfo = ^tDrawInfo;
  1757.  tDrawInfo = record
  1758.     dri_Version : Word;    { will be  DRI_VERSION                 }
  1759.     dri_NumPens : Word;    { guaranteed to be >= numDrIPens       }
  1760.     dri_Pens    : Pointer;  { pointer to pen array                 }
  1761.  
  1762.     dri_Font    : pTextFont;      { screen default font          }
  1763.     dri_Depth   : Word;            { (initial) depth of screen bitmap     }
  1764.  
  1765.     dri_Resolution : record      { from DisplayInfo database for initial display mode }
  1766.                    x : word;
  1767.                    y : word;
  1768.                    end;
  1769.  
  1770.     dri_Flags : ULONG;              { defined below                }
  1771. { New for V39: dri_CheckMark, dri_AmigaKey. }
  1772.     dri_CheckMark : pImage; { ImagePtr }         { pointer to scaled checkmark image
  1773.                                                   * Will be NULL if DRI_VERSION < 2
  1774.                                                   }
  1775.     dri_AmigaKey  : pImage; { ImagePtr }    { pointer to scaled Amiga-key image
  1776.                                              * Will be NULL if DRI_VERSION < 2
  1777.                                              }
  1778.  
  1779.     dri_Reserved : Array[0..4] of ULONG;        { avoid recompilation ;^)      }
  1780.  END;
  1781.  
  1782. CONST
  1783.  DRIF_NEWLOOK =   $00000001;      { specified SA_Pens, full treatment }
  1784.  
  1785. { rendering pen number indexes into DrawInfo.dri_Pens[]        }
  1786.  DETAILPEN    =    ($0000);       { compatible Intuition rendering pens  }
  1787.  BLOCKPEN     =    ($0001);       { compatible Intuition rendering pens  }
  1788.  TEXTPEN      =    ($0002);       { text on background                   }
  1789.  SHINEPEN     =    ($0003);       { bright edge on 3D objects            }
  1790.  SHADOWPEN    =    ($0004);       { dark edge on 3D objects              }
  1791.  FILLPEN      =    ($0005);       { active-window/selected-gadget fill   }
  1792.  FILLTEXTPEN  =    ($0006);       { text over FILLPEN                    }
  1793.  BACKGROUNDPEN =   ($0007);       { always color 0                       }
  1794.  HIGHLIGHTTEXTPEN = ($0008);       { special color text, on background    }
  1795. { New for V39, only present if DRI_VERSION >= 2: }
  1796.  BARDETAILPEN   =  ($0009);       { text/detail in screen-bar/menus }
  1797.  BARBLOCKPEN    =  ($000A);       { screen-bar/menus fill }
  1798.  BARTRIMPEN     =  ($000B);       { trim under screen-bar }
  1799.  
  1800.  NUMDRIPENS   =    ($0009);
  1801.  
  1802. { New for V39:  It is sometimes useful to specify that a pen value
  1803.  * is to be the complement of color zero to three.  The "magic" numbers
  1804.  * serve that purpose:
  1805.  }
  1806.  PEN_C3        =  $FEFC;          { Complement of color 3 }
  1807.  PEN_C2        =  $FEFD;          { Complement of color 2 }
  1808.  PEN_C1        =  $FEFE;          { Complement of color 1 }
  1809.  PEN_C0        =  $FEFF;          { Complement of color 0 }
  1810.  
  1811. { ======================================================================== }
  1812. { === Screen ============================================================= }
  1813. { ======================================================================== }
  1814.  
  1815. Type
  1816.  
  1817.     pScreen = ^tScreen;
  1818.     tScreen = record
  1819.         NextScreen      : pScreen;      { linked list of screens }
  1820.         FirstWindow     : pWindow;      { linked list Screen's Windows }
  1821.  
  1822.         LeftEdge,
  1823.         TopEdge         : Integer;        { parameters of the screen }
  1824.         Width,
  1825.         Height          : Integer;        { parameters of the screen }
  1826.  
  1827.         MouseY,
  1828.         MouseX          : Integer;        { position relative to upper-left }
  1829.  
  1830.         Flags           : Word;        { see definitions below }
  1831.  
  1832.         Title           : STRPTR;       { null-terminated Title text }
  1833.         DefaultTitle    : STRPTR;       { for Windows without ScreenTitle }
  1834.  
  1835.     { Bar sizes for this Screen and all Window's in this Screen }
  1836.         BarHeight,
  1837.         BarVBorder,
  1838.         BarHBorder,
  1839.         MenuVBorder,
  1840.         MenuHBorder     : Shortint;
  1841.         WBorTop,
  1842.         WBorLeft,
  1843.         WBorRight,
  1844.         WBorBottom      : Shortint;
  1845.  
  1846.         Font            : pTextAttr;  { this screen's default font       }
  1847.  
  1848.     { the display data structures for this Screen (note the prefix S)}
  1849.         ViewPort        : tViewPort;     { describing the Screen's display }
  1850.         RastPort        : tRastPort;     { describing Screen rendering      }
  1851.         BitMap          : tBitMap;       { extra copy of RastPort BitMap   }
  1852.         LayerInfo       : tLayer_Info;   { each screen gets a LayerInfo     }
  1853.  
  1854.     { You supply a linked-list of Gadgets for your Screen.
  1855.      *  This list DOES NOT include system Gadgets.  You get the standard
  1856.      *  system Screen Gadgets by default
  1857.      }
  1858.  
  1859.         FirstGadget     : pGadget;
  1860.  
  1861.         DetailPen,
  1862.         BlockPen        : Byte;         { for bar/border/gadget rendering }
  1863.  
  1864.     { the following variable(s) are maintained by Intuition to support the
  1865.      * DisplayBeep() color flashing technique
  1866.      }
  1867.         SaveColor0      : Word;
  1868.  
  1869.     { This layer is for the Screen and Menu bars }
  1870.         BarLayer        : pLayer;
  1871.  
  1872.         ExtData         : Pointer;
  1873.         UserData        : Pointer;
  1874.                         { general-purpose pointer to User data extension }
  1875.     {**** Data below this point are SYSTEM PRIVATE ****}
  1876.  
  1877.     end;
  1878.  
  1879. Const
  1880.  
  1881. { The screen flags have the suffix "_f" added to avoid conflicts with
  1882.   routine names. }
  1883.  
  1884. { --- FLAGS SET BY INTUITION --------------------------------------------- }
  1885. { The SCREENTYPE bits are reserved for describing various Screen types
  1886.  * available under Intuition.
  1887.  }
  1888.     SCREENTYPE_f        = $000F;        { all the screens types available       }
  1889. { --- the definitions for the Screen Type ------------------------------- }
  1890.     WBENCHSCREEN_f      = $0001;        { Ta Da!  The Workbench         }
  1891.     CUSTOMSCREEN_f      = $000F;        { for that special look         }
  1892.  
  1893.     SHOWTITLE_f         = $0010;        { this gets set by a call to ShowTitle() }
  1894.  
  1895.     BEEPING_f           = $0020;        { set when Screen is beeping            }
  1896.  
  1897.     CUSTOMBITMAP_f      = $0040;        { if you are supplying your own BitMap }
  1898.  
  1899.     SCREENBEHIND_f      = $0080;        { if you want your screen to open behind
  1900.                                          * already open screens
  1901.                                          }
  1902.     SCREENQUIET_f       = $0100;        { if you do not want Intuition to render
  1903.                                          * into your screen (gadgets, title)     }
  1904.     SCREENHIRES         = $0200;        { do no use lowres gadgets (private)       }
  1905.  
  1906.     NS_EXTENDED         = $1000;          { ExtNewScreen.Extension is valid      }
  1907.     { V36 applications can use OpenScreenTagList() instead of NS_EXTENDED  }
  1908.  
  1909. { New for V39: }
  1910.     PENSHARED           = $0400;  { Screen opener set (SA_SharePens,TRUE) }
  1911.  
  1912.  
  1913.     AUTOSCROLL          = $4000;  { screen is to autoscoll               }
  1914.  
  1915.     STDSCREENHEIGHT     = -1;           { supply in NewScreen.Height            }
  1916.     STDSCREENWIDTH      = -1;           { supply in NewScreen.Width             }
  1917.  
  1918.  
  1919.  
  1920. {
  1921.  * Screen attribute tag ID's.  These are used in the ti_Tag field of
  1922.  * TagItem arrays passed to OpenScreenTagList() (or in the
  1923.  * ExtNewScreen.Extension field).
  1924.  }
  1925.  
  1926. { Screen attribute tags.  Please use these versions, not those in
  1927.  * iobsolete.h.
  1928.  }
  1929. CONST
  1930.   SA_Dummy    =    (TAG_USER + 32);
  1931. {
  1932.  * these items specify items equivalent to fields in NewScreen
  1933.  }
  1934.  SA_Left     =    (SA_Dummy + $0001);
  1935.  SA_Top      =    (SA_Dummy + $0002);
  1936.  SA_Width    =    (SA_Dummy + $0003);
  1937.  SA_Height   =    (SA_Dummy + $0004);
  1938.                         { traditional screen positions and dimensions  }
  1939.  SA_Depth    =    (SA_Dummy + $0005);
  1940.                         { screen bitmap depth                          }
  1941.  SA_DetailPen=    (SA_Dummy + $0006);
  1942.                         { serves as default for windows, too           }
  1943.  SA_BlockPen =    (SA_Dummy + $0007);
  1944.  SA_Title    =    (SA_Dummy + $0008);
  1945.                         { default screen title                         }
  1946.  SA_Colors   =    (SA_Dummy + $0009);
  1947.                         { ti_Data is an array of struct ColorSpec,
  1948.                          * terminated by ColorIndex = -1.  Specifies
  1949.                          * initial screen palette colors.
  1950.                          }
  1951.  SA_ErrorCode=    (SA_Dummy + $000A);
  1952.                         { ti_Data points to LONG error code (values below)}
  1953.  SA_Font     =    (SA_Dummy + $000B);
  1954.                         { equiv. to NewScreen.Font                     }
  1955.  SA_SysFont  =    (SA_Dummy + $000C);
  1956.                         { Selects one of the preferences system fonts:
  1957.                          *      0 - old DefaultFont, fixed-width
  1958.                          *      1 - WB Screen preferred font
  1959.                          }
  1960.  SA_Type     =    (SA_Dummy + $000D);
  1961.                         { equiv. to NewScreen.Type                     }
  1962.  SA_BitMap   =    (SA_Dummy + $000E);
  1963.                         { ti_Data is pointer to custom BitMap.  This
  1964.                          * implies type of CUSTOMBITMAP
  1965.                          }
  1966.  SA_PubName  =    (SA_Dummy + $000F);
  1967.                         { presence of this tag means that the screen
  1968.                          * is to be a public screen.  Please specify
  1969.                          * BEFORE the two tags below
  1970.                          }
  1971.  SA_PubSig   =    (SA_Dummy + $0010);
  1972.  SA_PubTask  =    (SA_Dummy + $0011);
  1973.                         { Task ID and signal for being notified that
  1974.                          * the last window has closed on a public screen.
  1975.                          }
  1976.  SA_DisplayID=    (SA_Dummy + $0012);
  1977.                         { ti_Data is new extended display ID from
  1978.                          * <graphics/displayinfo.h>.
  1979.                          }
  1980.  SA_DClip    =    (SA_Dummy + $0013);
  1981.                         { ti_Data points to a rectangle which defines
  1982.                          * screen display clip region
  1983.                          }
  1984.  SA_Overscan =    (SA_Dummy + $0014);
  1985.                         { was S_STDDCLIP.  Set to one of the OSCAN_
  1986.                          * specifiers below to get a system standard
  1987.                          * overscan region for your display clip,
  1988.                          * screen dimensions (unless otherwise specified),
  1989.                          * and automatically centered position (partial
  1990.                          * support only so far).
  1991.                          * If you use this, you shouldn't specify
  1992.                          * SA_DClip.  SA_Overscan is for "standard"
  1993.                          * overscan dimensions, SA_DClip is for
  1994.                          * your custom numeric specifications.
  1995.                          }
  1996.  SA_Obsolete1=    (SA_Dummy + $0015);
  1997.                         { obsolete S_MONITORNAME                       }
  1998.  
  1999. {* booleans *}
  2000.  SA_ShowTitle  =  (SA_Dummy + $0016);
  2001.                         { boolean equivalent to flag SHOWTITLE         }
  2002.  SA_Behind     =  (SA_Dummy + $0017);
  2003.                         { boolean equivalent to flag SCREENBEHIND      }
  2004.  SA_Quiet      =  (SA_Dummy + $0018);
  2005.                         { boolean equivalent to flag SCREENQUIET       }
  2006.  SA_AutoScroll =  (SA_Dummy + $0019);
  2007.                         { boolean equivalent to flag AUTOSCROLL        }
  2008.  SA_Pens       =  (SA_Dummy + $001A);
  2009.                         { pointer to ~0 terminated UWORD array, as
  2010.                          * found in struct DrawInfo
  2011.                          }
  2012.  SA_FullPalette=  (SA_Dummy + $001B);
  2013.                         { boolean: initialize color table to entire
  2014.                          *  preferences palette (32 for V36), rather
  2015.                          * than compatible pens 0-3, 17-19, with
  2016.                          * remaining palette as returned by GetColorMap()
  2017.                          }
  2018.  
  2019.  SA_ColorMapEntries = (SA_Dummy + $001C);
  2020.                         { New for V39:
  2021.                          * Allows you to override the number of entries
  2022.                          * in the ColorMap for your screen.  Intuition
  2023.                          * normally allocates (1<<depth) or 32, whichever
  2024.                          * is more, but you may require even more if you
  2025.                          * use certain V39 graphics.library features
  2026.                          * (eg. palette-banking).
  2027.                          }
  2028.  
  2029.  SA_Parent      = (SA_Dummy + $001D);
  2030.                         { New for V39:
  2031.                          * ti_Data is a pointer to a "parent" screen to
  2032.                          * attach this one to.  Attached screens slide
  2033.                          * and depth-arrange together.
  2034.                          }
  2035.  
  2036.  SA_Draggable   = (SA_Dummy + $001E);
  2037.                         { New for V39:
  2038.                          * Boolean tag allowing non-draggable screens.
  2039.                          * Do not use without good reason!
  2040.                          * (Defaults to TRUE).
  2041.                          }
  2042.  
  2043.  SA_Exclusive   = (SA_Dummy + $001F);
  2044.                         { New for V39:
  2045.                          * Boolean tag allowing screens that won't share
  2046.                          * the display.  Use sparingly!  Starting with 3.01,
  2047.                          * attached screens may be SA_Exclusive.  Setting
  2048.                          * SA_Exclusive for each screen will produce an
  2049.                          * exclusive family.   (Defaults to FALSE).
  2050.                          }
  2051.  
  2052.  SA_SharePens   = (SA_Dummy + $0020);
  2053.                         { New for V39:
  2054.                          * For those pens in the screen's DrawInfo->dri_Pens,
  2055.                          * Intuition obtains them in shared mode (see
  2056.                          * graphics.library/ObtainPen()).  For compatibility,
  2057.                          * Intuition obtains the other pens of a public
  2058.                          * screen as PEN_EXCLUSIVE.  Screens that wish to
  2059.                          * manage the pens themselves should generally set
  2060.                          * this tag to TRUE.  This instructs Intuition to
  2061.                          * leave the other pens unallocated.
  2062.                          }
  2063.  
  2064.  SA_BackFill    = (SA_Dummy + $0021);
  2065.                         { New for V39:
  2066.                          * provides a "backfill hook" for your screen's
  2067.                          * Layer_Info.
  2068.                          * See layers.library/InstallLayerInfoHook()
  2069.                          }
  2070.  
  2071.  SA_Interleaved = (SA_Dummy + $0022);
  2072.                         { New for V39:
  2073.                          * Boolean tag requesting that the bitmap
  2074.                          * allocated for you be interleaved.
  2075.                          * (Defaults to FALSE).
  2076.                          }
  2077.  
  2078.  SA_Colors32    = (SA_Dummy + $0023);
  2079.                         { New for V39:
  2080.                          * Tag to set the screen's initial palette colors
  2081.                          * at 32 bits-per-gun.  ti_Data is a pointer
  2082.                          * to a table to be passed to the
  2083.                          * graphics.library/LoadRGB32() function.
  2084.                          * This format supports both runs of color
  2085.                          * registers and sparse registers.  See the
  2086.                          * autodoc for that function for full details.
  2087.                          * Any color set here has precedence over
  2088.                          * the same register set by SA_Colors.
  2089.                          }
  2090.  
  2091.  SA_VideoControl = (SA_Dummy + $0024);
  2092.                         { New for V39:
  2093.                          * ti_Data is a pointer to a taglist that Intuition
  2094.                          * will pass to graphics.library/VideoControl(),
  2095.                          * upon opening the screen.
  2096.                          }
  2097.  
  2098.  SA_FrontChild  = (SA_Dummy + $0025);
  2099.                         { New for V39:
  2100.                          * ti_Data is a pointer to an already open screen
  2101.                          * that is to be the child of the screen being
  2102.                          * opened.  The child screen will be moved to the
  2103.                          * front of its family.
  2104.                          }
  2105.  
  2106.  SA_BackChild   = (SA_Dummy + $0026);
  2107.                         { New for V39:
  2108.                          * ti_Data is a pointer to an already open screen
  2109.                          * that is to be the child of the screen being
  2110.                          * opened.  The child screen will be moved to the
  2111.                          * back of its family.
  2112.                          }
  2113.  
  2114.  SA_LikeWorkbench     =   (SA_Dummy + $0027);
  2115.                         { New for V39:
  2116.                          * Set ti_Data to 1 to request a screen which
  2117.                          * is just like the Workbench.  This gives
  2118.                          * you the same screen mode, depth, size,
  2119.                          * colors, etc., as the Workbench screen.
  2120.                          }
  2121.  
  2122.  SA_Reserved          =   (SA_Dummy + $0028);
  2123.                         { Reserved for private Intuition use }
  2124.  
  2125.  SA_MinimizeISG       =   (SA_Dummy + $0029);
  2126.                         { New for V40:
  2127.                          * For compatibility, Intuition always ensures
  2128.                          * that the inter-screen gap is at least three
  2129.                          * non-interlaced lines.  If your application
  2130.                          * would look best with the smallest possible
  2131.                          * inter-screen gap, set ti_Data to TRUE.
  2132.                          * If you use the new graphics VideoControl()
  2133.                          * VC_NoColorPaletteLoad tag for your screen's
  2134.                          * ViewPort, you should also set this tag.
  2135.                           }
  2136.  
  2137.  
  2138. { this is an obsolete tag included only for compatibility with V35
  2139.  * interim release for the A2024 and Viking monitors
  2140.  }
  2141.  NSTAG_EXT_VPMODE = (TAG_USER + 1);
  2142.  
  2143.  
  2144. { OpenScreen error codes, which are returned in the (optional) LONG
  2145.  * pointed to by ti_Data for the SA_ErrorCode tag item
  2146.  }
  2147.  OSERR_NOMONITOR   = (1);     { named monitor spec not available     }
  2148.  OSERR_NOCHIPS     = (2);     { you need newer custom chips          }
  2149.  OSERR_NOMEM       = (3);     { couldn't get normal memory           }
  2150.  OSERR_NOCHIPMEM   = (4);     { couldn't get chipmem                 }
  2151.  OSERR_PUBNOTUNIQUE= (5);     { public screen name already used      }
  2152.  OSERR_UNKNOWNMODE = (6);     { don't recognize mode asked for       }
  2153.  
  2154. { ======================================================================== }
  2155. { === NewScreen ========================================================== }
  2156. { ======================================================================== }
  2157.  
  2158. Type
  2159.  
  2160.     pNewScreen = ^tNewScreen;
  2161.     tNewScreen = record
  2162.         LeftEdge,
  2163.         TopEdge,
  2164.         Width,
  2165.         Height,
  2166.         Depth           : Integer;        { screen dimensions }
  2167.  
  2168.         DetailPen,
  2169.         BlockPen        : Byte;         { for bar/border/gadget rendering }
  2170.  
  2171.         ViewModes       : Word;        { the Modes for the ViewPort (and View) }
  2172.  
  2173.         SType           : Word;        { the Screen type (see defines above) }
  2174.  
  2175.         Font            : pTextAttr;  { this Screen's default text attributes }
  2176.  
  2177.         DefaultTitle    : STRPTR;       { the default title for this Screen }
  2178.  
  2179.         Gadgets         : pGadget;      { your own Gadgets for this Screen }
  2180.  
  2181.     { if you are opening a CUSTOMSCREEN and already have a BitMap
  2182.      * that you want used for your Screen, you set the flags CUSTOMBITMAP in
  2183.      * the Type field and you set this variable to point to your BitMap
  2184.      * structure.  The structure will be copied into your Screen structure,
  2185.      * after which you may discard your own BitMap if you want
  2186.      }
  2187.  
  2188.         CustomBitMap    : pBitMap;
  2189.     end;
  2190.  
  2191.  
  2192. type
  2193.  
  2194.  pExtNewScreen = ^tExtNewScreen;
  2195.  tExtNewScreen = record
  2196.   LeftEdge, TopEdge, Width, Height, Depth : Integer;
  2197.   DetailPen, BlockPen : Byte;
  2198.   ViewModes : Word;
  2199.   ens_Type : Word;     { Type in C-Includes }
  2200.   Font : pTextAttr;
  2201.   DefaultTitle : STRPTR;
  2202.   Gadgets : pGadget;
  2203.   CustomBitMap : pBitMap;
  2204.   Extension : pTagItem;
  2205.  END;
  2206.  
  2207.  
  2208. CONST
  2209. { === Overscan Types ===       }
  2210.  OSCAN_TEXT     = (1);     { entirely visible     }
  2211.  OSCAN_STANDARD = (2);     { just past edges      }
  2212.  OSCAN_MAX      = (3);     { as much as possible  }
  2213.  OSCAN_VIDEO    = (4);     { even more than is possible   }
  2214.  
  2215.  
  2216. { === Public Shared Screen Node ===    }
  2217.  
  2218. { This is the representative of a public shared screen.
  2219.  * This is an internal data structure, but some functions may
  2220.  * present a copy of it to the calling application.  In that case,
  2221.  * be aware that the screen pointer of the structure can NOT be
  2222.  * used safely, since there is no guarantee that the referenced
  2223.  * screen will remain open and a valid data structure.
  2224.  *
  2225.  * Never change one of these.
  2226.  }
  2227.  
  2228. Type
  2229.    pPubScreenNode = ^tPubScreenNode;
  2230.    tPubScreenNode = record
  2231.     psn_Node    : tNode;       { ln_Name is screen name }
  2232.     psn_Screen  : pScreen;
  2233.     psn_Flags   : Word;      { below                }
  2234.     psn_Size    : Integer;      { includes name buffer }
  2235.     psn_VisitorCount  : Integer; { how many visitor windows }
  2236.     psn_SigTask : pTask;    { who to signal when visitors gone }
  2237.     psn_SigBit  : Byte;     { which signal }
  2238.    END;
  2239.  
  2240. CONST
  2241.  PSNF_PRIVATE  =  ($0001);
  2242.  
  2243.  MAXPUBSCREENNAME  =      (139);   { names no longer, please      }
  2244.  
  2245. { pub screen modes     }
  2246.  SHANGHAI      =  $0001;  { put workbench windows on pub screen }
  2247.  POPPUBSCREEN  =  $0002;  { pop pub screen to front when visitor opens }
  2248.  
  2249. { New for V39:  Intuition has new screen depth-arrangement and movement
  2250.  * functions called ScreenDepth() and ScreenPosition() respectively.
  2251.  * These functions permit the old behavior of ScreenToFront(),
  2252.  * ScreenToBack(), and MoveScreen().  ScreenDepth() also allows
  2253.  * independent depth control of attached screens.  ScreenPosition()
  2254.  * optionally allows positioning screens even though they were opened
  2255.  * (SA_Draggable,FALSE).
  2256.  }
  2257.  
  2258. { For ScreenDepth(), specify one of SDEPTH_TOFRONT or SDEPTH_TOBACK,
  2259.  * and optionally also SDEPTH_INFAMILY.
  2260.  *
  2261.  * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  2262.  * SDEPTH_INFAMILY.  Commodities, "input helper" programs,
  2263.  * or any other program that did not open a screen should never
  2264.  * use that flag.  (Note that this is a style-behavior
  2265.  * requirement;  there is no technical requirement that the
  2266.  * task calling this function need be the task which opened
  2267.  * the screen).
  2268.  }
  2269.  
  2270.  SDEPTH_TOFRONT        =  (0);     { Bring screen to front }
  2271.  SDEPTH_TOBACK         =  (1);     { Send screen to back }
  2272.  SDEPTH_INFAMILY       =  (2);     { Move an attached screen with
  2273.                                          * respect to other screens of
  2274.                                          * its family
  2275.                                          }
  2276.  
  2277. { Here's an obsolete name equivalent to SDEPTH_INFAMILY: }
  2278.  SDEPTH_CHILDONLY      =  SDEPTH_INFAMILY;
  2279.  
  2280.  
  2281. { For ScreenPosition(), specify one of SPOS_RELATIVE, SPOS_ABSOLUTE,
  2282.  * or SPOS_MAKEVISIBLE to describe the kind of screen positioning you
  2283.  * wish to perform:
  2284.  *
  2285.  * SPOS_RELATIVE: The x1 and y1 parameters to ScreenPosition() describe
  2286.  *      the offset in coordinates you wish to move the screen by.
  2287.  * SPOS_ABSOLUTE: The x1 and y1 parameters to ScreenPosition() describe
  2288.  *      the absolute coordinates you wish to move the screen to.
  2289.  * SPOS_MAKEVISIBLE: (x1,y1)-(x2,y2) describes a rectangle on the
  2290.  *      screen which you would like autoscrolled into view.
  2291.  *
  2292.  * You may additionally set SPOS_FORCEDRAG along with any of the
  2293.  * above.  Set this if you wish to reposition an (SA_Draggable,FALSE)
  2294.  * screen that you opened.
  2295.  *
  2296.  * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  2297.  * SPOS_FORCEDRAG.  Commodities, "input helper" programs,
  2298.  * or any other program that did not open a screen should never
  2299.  * use that flag.
  2300.  }
  2301.  
  2302.  SPOS_RELATIVE         =  (0);     { Coordinates are relative }
  2303.  
  2304.  SPOS_ABSOLUTE         =  (1);     { Coordinates are expressed as
  2305.                                          * absolutes, not relatives.
  2306.                                          }
  2307.  
  2308.  SPOS_MAKEVISIBLE      =  (2);     { Coordinates describe a box on
  2309.                                          * the screen you wish to be
  2310.                                          * made visible by autoscrolling
  2311.                                          }
  2312.  
  2313.  SPOS_FORCEDRAG        =  (4);     { Move non-draggable screen }
  2314.  
  2315. { New for V39: Intuition supports double-buffering in screens,
  2316.  * with friendly interaction with menus and certain gadgets.
  2317.  * For each buffer, you need to get one of these structures
  2318.  * from the AllocScreenBuffer() call.  Never allocate your
  2319.  * own ScreenBuffer structures!
  2320.  *
  2321.  * The sb_DBufInfo field is for your use.  See the graphics.library
  2322.  * AllocDBufInfo() autodoc for details.
  2323.  }
  2324. Type
  2325.  
  2326.  pScreenBuffer = ^tScreenBuffer;
  2327.  tScreenBuffer = record
  2328.     sb_BitMap  : pBitMap;           { BitMap of this buffer }
  2329.     sb_DBufInfo : pDBufInfo;       { DBufInfo for this buffer }
  2330.  end;
  2331.  
  2332. const
  2333. { These are the flags that may be passed to AllocScreenBuffer().
  2334.  }
  2335.  SB_SCREEN_BITMAP      =  1;
  2336.  SB_COPY_BITMAP        =  2;
  2337.  
  2338.  
  2339. { ======================================================================== }
  2340. { === Preferences ======================================================== }
  2341. { ======================================================================== }
  2342.  
  2343. Const
  2344.  
  2345. { these are the definitions for the printer configurations }
  2346.     FILENAME_SIZE       = 30;           { Filename size }
  2347.  
  2348.     POINTERSIZE         = (1 + 16 + 1) * 2;     { Size of Pointer data buffer }
  2349.  
  2350. { These defines are for the default font size.   These actually describe the
  2351.  * height of the defaults fonts.  The default font type is the topaz
  2352.  * font, which is a fixed width font that can be used in either
  2353.  * eighty-column or sixty-column mode.  The Preferences structure reflects
  2354.  * which is currently selected by the value found in the variable FontSize,
  2355.  * which may have either of the values defined below.  These values actually
  2356.  * are used to select the height of the default font.  By changing the
  2357.  * height, the resolution of the font changes as well.
  2358.  }
  2359.     TOPAZ_EIGHTY        = 8;
  2360.     TOPAZ_SIXTY         = 9;
  2361.  
  2362. Type
  2363.  
  2364.     pPreferences = ^tPreferences;
  2365.     tPreferences = record
  2366.     { the default font height }
  2367.         FontHeight      : Shortint;         { height for system default font  }
  2368.  
  2369.     { constant describing what's hooked up to the port }
  2370.         PrinterPort     : Byte;         { printer port connection     }
  2371.  
  2372.     { the baud rate of the port }
  2373.         BaudRate        : Word;        { baud rate for the serial port   }
  2374.  
  2375.     { various timing rates }
  2376.         KeyRptSpeed     : ttimeval;      { repeat speed for keyboard       }
  2377.         KeyRptDelay     : ttimeval;      { Delay before keys repeat             }
  2378.         DoubleClick     : ttimeval;      { Interval allowed between clicks }
  2379.  
  2380.     { Intuition Pointer data }
  2381.         PointerMatrix   : Array [0..POINTERSIZE-1] of Word;
  2382.                                         { Definition of pointer sprite     }
  2383.         XOffset         : Shortint;         { X-Offset for active 'bit'       }
  2384.         YOffset         : Shortint;         { Y-Offset for active 'bit'       }
  2385.         color17         : Word;        {*********************************}
  2386.         color18         : Word;        { Colours for sprite pointer      }
  2387.         color19         : Word;        {*********************************}
  2388.         PointerTicks    : Word;        { Sensitivity of the pointer       }
  2389.  
  2390.     { Workbench Screen colors }
  2391.         color0          : Word;        {*********************************}
  2392.         color1          : Word;        {   Standard default colours      }
  2393.         color2          : Word;        {   Used in the Workbench         }
  2394.         color3          : Word;        {*********************************}
  2395.  
  2396.     { positioning data for the Intuition View }
  2397.         ViewXOffset     : Shortint;         { Offset for top lefthand corner  }
  2398.         ViewYOffset     : Shortint;         { X and Y dimensions           }
  2399.         ViewInitX,
  2400.         ViewInitY       : Integer;        { View initial offset values      }
  2401.  
  2402.         EnableCLI       : Boolean;      { CLI availability switch }
  2403.  
  2404.     { printer configurations }
  2405.         PrinterType     : Word;        { printer type                     }
  2406.         PrinterFilename : Array [0..FILENAME_SIZE-1] of Char;
  2407.                                         { file for printer         }
  2408.  
  2409.     { print format and quality configurations }
  2410.         PrintPitch      : Word;        { print pitch              }
  2411.         PrintQuality    : Word;        { print quality    }
  2412.         PrintSpacing    : Word;        { number of lines per inch    }
  2413.         PrintLeftMargin : Word;        { left margin in characters        }
  2414.         PrintRightMargin : Word;       { right margin in characters       }
  2415.         PrintImage      : Word;        { positive or negative         }
  2416.         PrintAspect     : Word;        { horizontal or vertical      }
  2417.         PrintShade      : Word;        { b&w, half-tone, or color    }
  2418.         PrintThreshold  : Integer;        { darkness ctrl for b/w dumps      }
  2419.  
  2420.     { print paper descriptors }
  2421.         PaperSize       : Word;        { paper size               }
  2422.         PaperLength     : Word;        { paper length in number of lines }
  2423.         PaperType       : Word;        { continuous or single sheet       }
  2424.  
  2425.     { Serial device settings: These are six nibble-fields in three bytes }
  2426.     { (these look a little strange so the defaults will map out to zero) }
  2427.         SerRWBits       : Byte;
  2428.                              { upper nibble = (8-number of read bits)     }
  2429.                              { lower nibble = (8-number of write bits)    }
  2430.         SerStopBuf      : Byte;
  2431.                              { upper nibble = (number of stop bits - 1)  }
  2432.                              { lower nibble = (table value for BufSize)  }
  2433.         SerParShk       : Byte;
  2434.                              { upper nibble = (value for Parity setting) }
  2435.                              { lower nibble = (value for Handshake mode) }
  2436.         LaceWB          : Byte;         { if workbench is to be interlaced      }
  2437.  
  2438.         WorkName        : Array [0..FILENAME_SIZE-1] of Char;
  2439.                                         { temp file for printer         }
  2440.  
  2441.         RowSizeChange   : Shortint;
  2442.         ColumnSizeChange : Shortint;
  2443.  
  2444.         PrintFlags      : Word;        { user preference flags }
  2445.         PrintMaxWidth   : Word;        { max width of printed picture in 10ths/inch }
  2446.         PrintMaxHeight  : Word;        { max height of printed picture in 10ths/inch }
  2447.         PrintDensity    : Byte;         { print density }
  2448.         PrintXOffset    : Byte;         { offset of printed picture in 10ths/inch }
  2449.  
  2450.         wb_Width        : Word;        { override default workbench width       }
  2451.         wb_Height       : Word;        { override default workbench height }
  2452.         wb_Depth        : Byte;         { override default workbench depth       }
  2453.  
  2454.         ext_size        : Byte;         { extension information -- do not touch! }
  2455.                             { extension size in blocks of 64 bytes }
  2456.     end;
  2457.  
  2458. Const
  2459.  
  2460. { Workbench Interlace (use one bit) }
  2461.     LACEWB              = $01;
  2462.     LW_RESERVED         = 1;     { internal use only }
  2463.  
  2464. { PrinterPort }
  2465.     PARALLEL_PRINTER    = $00;
  2466.     SERIAL_PRINTER      = $01;
  2467.  
  2468. { BaudRate }
  2469.     BAUD_110            = $00;
  2470.     BAUD_300            = $01;
  2471.     BAUD_1200           = $02;
  2472.     BAUD_2400           = $03;
  2473.     BAUD_4800           = $04;
  2474.     BAUD_9600           = $05;
  2475.     BAUD_19200          = $06;
  2476.     BAUD_MIDI           = $07;
  2477.  
  2478. { PaperType }
  2479.     FANFOLD             = $00;
  2480.     SINGLE              = $80;
  2481.  
  2482. { PrintPitch }
  2483.     PICA                = $000;
  2484.     ELITE               = $400;
  2485.     FINE                = $800;
  2486.  
  2487. { PrintQuality }
  2488.     DRAFT               = $000;
  2489.     LETTER              = $100;
  2490.  
  2491. { PrintSpacing }
  2492.     SIX_LPI             = $000;
  2493.     EIGHT_LPI           = $200;
  2494.  
  2495. { Print Image }
  2496.     IMAGE_POSITIVE      = $00;
  2497.     IMAGE_NEGATIVE      = $01;
  2498.  
  2499. { PrintAspect }
  2500.     ASPECT_HORIZ        = $00;
  2501.     ASPECT_VERT         = $01;
  2502.  
  2503. { PrintShade }
  2504.     SHADE_BW            = $00;
  2505.     SHADE_GREYSCALE     = $01;
  2506.     SHADE_COLOR         = $02;
  2507.  
  2508. { PaperSize }
  2509.     US_LETTER           = $00;
  2510.     US_LEGAL            = $10;
  2511.     N_TRACTOR           = $20;
  2512.     W_TRACTOR           = $30;
  2513.     CUSTOM_PAPER        = $40;
  2514.  
  2515. { New PaperSizes for V36: }
  2516.  EURO_A0 = $50;            { European size A0: 841 x 1189 }
  2517.  EURO_A1 = $60;            { European size A1: 594 x 841 }
  2518.  EURO_A2 = $70;            { European size A2: 420 x 594 }
  2519.  EURO_A3 = $80;            { European size A3: 297 x 420 }
  2520.  EURO_A4 = $90;            { European size A4: 210 x 297 }
  2521.  EURO_A5 = $A0;            { European size A5: 148 x 210 }
  2522.  EURO_A6 = $B0;            { European size A6: 105 x 148 }
  2523.  EURO_A7 = $C0;            { European size A7: 74 x 105 }
  2524.  EURO_A8 = $D0;            { European size A8: 52 x 74 }
  2525.  
  2526. { PrinterType }
  2527.     CUSTOM_NAME         = $00;
  2528.     ALPHA_P_101         = $01;
  2529.     BROTHER_15XL        = $02;
  2530.     CBM_MPS1000         = $03;
  2531.     DIAB_630            = $04;
  2532.     DIAB_ADV_D25        = $05;
  2533.     DIAB_C_150          = $06;
  2534.     EPSON               = $07;
  2535.     EPSON_JX_80         = $08;
  2536.     OKIMATE_20          = $09;
  2537.     QUME_LP_20          = $0A;
  2538. { new printer entries, 3 October 1985 }
  2539.     HP_LASERJET         = $0B;
  2540.     HP_LASERJET_PLUS    = $0C;
  2541.  
  2542. { Serial Input Buffer Sizes }
  2543.     SBUF_512            = $00;
  2544.     SBUF_1024           = $01;
  2545.     SBUF_2048           = $02;
  2546.     SBUF_4096           = $03;
  2547.     SBUF_8000           = $04;
  2548.     SBUF_16000          = $05;
  2549.  
  2550. { Serial Bit Masks }
  2551.     SREAD_BITS          = $F0;          { for SerRWBits   }
  2552.     SWRITE_BITS         = $0F;
  2553.  
  2554.     SSTOP_BITS          = $F0;          { for SerStopBuf  }
  2555.     SBUFSIZE_BITS       = $0F;
  2556.  
  2557.     SPARITY_BITS        = $F0;          { for SerParShk }
  2558.     SHSHAKE_BITS        = $0F;
  2559.  
  2560. { Serial Parity (upper nibble, after being shifted by
  2561.  * macro SPARNUM() )
  2562.  }
  2563.     SPARITY_NONE        = 0;
  2564.     SPARITY_EVEN        = 1;
  2565.     SPARITY_ODD         = 2;
  2566.  
  2567. { Serial Handshake Mode (lower nibble, after masking using
  2568.  * macro SHANKNUM() )
  2569.  }
  2570.     SHSHAKE_XON         = 0;
  2571.     SHSHAKE_RTS         = 1;
  2572.     SHSHAKE_NONE        = 2;
  2573.  
  2574. { new defines for PrintFlags }
  2575.  
  2576.     CORRECT_RED         = $0001;        { color correct red shades }
  2577.     CORRECT_GREEN       = $0002;        { color correct green shades }
  2578.     CORRECT_BLUE        = $0004;        { color correct blue shades }
  2579.  
  2580.     CENTER_IMAGE        = $0008;        { center image on paper }
  2581.  
  2582.     IGNORE_DIMENSIONS   = $0000;        { ignore max width/height settings }
  2583.     BOUNDED_DIMENSIONS  = $0010;        { use max width/height as boundaries }
  2584.     ABSOLUTE_DIMENSIONS = $0020;        { use max width/height as absolutes }
  2585.     PIXEL_DIMENSIONS    = $0040;        { use max width/height as prt pixels }
  2586.     MULTIPLY_DIMENSIONS = $0080;        { use max width/height as multipliers }
  2587.  
  2588.     INTEGER_SCALING     = $0100;        { force integer scaling }
  2589.  
  2590.     ORDERED_DITHERING   = $0000;        { ordered dithering }
  2591.     HALFTONE_DITHERING  = $0200;        { halftone dithering }
  2592.     FLOYD_DITHERING     = $0400;        { Floyd-Steinberg dithering }
  2593.  
  2594.     ANTI_ALIAS          = $0800;        { anti-alias image }
  2595.     GREY_SCALE2         = $1000;        { for use with hi-res monitor }
  2596.  
  2597. { masks used for checking bits }
  2598.  
  2599.     CORRECT_RGB_MASK    = CORRECT_RED + CORRECT_GREEN + CORRECT_BLUE;
  2600.     DIMENSIONS_MASK     = BOUNDED_DIMENSIONS + ABSOLUTE_DIMENSIONS +
  2601.                                 PIXEL_DIMENSIONS + MULTIPLY_DIMENSIONS;
  2602.     DITHERING_MASK      = HALFTONE_DITHERING + FLOYD_DITHERING;
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609. { ======================================================================== }
  2610. { === IntuitionBase ====================================================== }
  2611. { ======================================================================== }
  2612. {
  2613.  * Be sure to protect yourself against someone modifying these data as
  2614.  * you look at them.  This is done by calling:
  2615.  *
  2616.  * lock = LockIBase(0), which returns an Integer.  When done call
  2617.  * UnlockIBase(lock) where lock is what LockIBase() returned.
  2618.  }
  2619.  
  2620. Type
  2621.  
  2622.     pIntuitionBase = ^tIntuitionBase;
  2623.     tIntuitionBase = record
  2624. { IntuitionBase should never be directly modified by programs   }
  2625. { even a little bit, guys/gals; do you hear me? }
  2626.  
  2627.         LibNode         : tLibrary;
  2628.  
  2629.         ViewLord        : tView;
  2630.  
  2631.         ActiveWindow    : pWindow;
  2632.         ActiveScreen    : pScreen;
  2633.  
  2634.     { the FirstScreen variable points to the frontmost Screen.   Screens are
  2635.      * then maintained in a front to back order using Screen.NextScreen
  2636.      }
  2637.  
  2638.         FirstScreen     : pScreen;    { for linked list of all screens }
  2639.  
  2640.         Flags           : ULONG;      { see definitions below }
  2641.         MouseY,
  2642.         MouseX          : Integer;        { mouse position relative to View }
  2643.  
  2644.         Seconds         : ULONG;      { timestamp of most current input event }
  2645.         Micros          : ULONG;      { timestamp of most current input event }
  2646.  
  2647.     { I told you this was private.
  2648.      * The data beyond this point has changed, is changing, and
  2649.      * will continue to change.
  2650.      }
  2651.  
  2652.     end;
  2653.  
  2654.  
  2655. {
  2656.  * Package of information passed to custom and 'boopsi'
  2657.  * gadget 'hook' functions.  This structure is READ ONLY.
  2658.  }
  2659. Type
  2660.  
  2661.    pGadgetInfo = ^tGadgetInfo;
  2662.    tGadgetInfo = record
  2663.     gi_Screen                   : pScreen;       { ScreenPtr }
  2664.     gi_Window                   : pWindow;       { null for screen gadgets }    { WindowPtr }
  2665.     gi_Requester                : pRequester;    { null IF not GTYP_REQGADGET } { RequesterPtr }
  2666.  
  2667.     { rendering information:
  2668.      * don't use these without cloning/locking.
  2669.      * Official way is to call ObtainRPort()
  2670.      }
  2671.     gi_RastPort                 : pRastPort;     { RastPortPtr }
  2672.     gi_Layer                    : pLayer;        { LayerPtr }
  2673.  
  2674.     { copy of dimensions of screen/window/g00/req(/group)
  2675.      * that gadget resides in.  Left/Top of this box is
  2676.      * offset from window mouse coordinates to gadget coordinates
  2677.      *          screen gadgets:                 0,0 (from screen coords)
  2678.      *  window gadgets (no g00):        0,0
  2679.      *  GTYP_GZZGADGETs (borderlayer):          0,0
  2680.      *  GZZ innerlayer gadget:          borderleft, bordertop
  2681.      *  Requester gadgets:              reqleft, reqtop
  2682.      }
  2683.     gi_Domain                   : tIBox;
  2684.  
  2685.     gi_Pens                     : record
  2686.                       DetailPen : Byte;
  2687.                       BlockPen  : Byte;
  2688.                                   end;
  2689.  
  2690.     { the Detail and Block pens in gi_DrInfo->dri_Pens[] are
  2691.      * for the screen.  Use the above for window-sensitive
  2692.      * colors.
  2693.      }
  2694.     gi_DrInfo                   : pDrawInfo;  { DrawInfoPtr }
  2695.  
  2696.     { reserved space: this structure is extensible
  2697.      * anyway, but using these saves some recompilation
  2698.      }
  2699.     gi_Reserved                 : Array[0..5] of ULONG;
  2700.    END;
  2701.  
  2702. {** system private data structure for now **}
  2703. { prop gadget extra info       }
  2704.  
  2705.    pPGX = ^tPGX;
  2706.    tPGX = record
  2707.     pgx_Container : tIBox;
  2708.     pgx_NewKnob   : tIBox;
  2709.    END;
  2710.  
  2711. { this casts MutualExclude for easy assignment of a hook
  2712.  * pointer to the unused MutualExclude field of a custom gadget
  2713.  }
  2714.  
  2715. {** User visible handles on objects, classes, messages **}
  2716. Type
  2717.  Object_ = ULONG;
  2718.  pObject_ = ^Object_;
  2719.  ClassID = ^Byte;
  2720.  
  2721. {
  2722.  you can use this type to point to a 'generic' message,
  2723.  * in the object-oriented programming parlance.  Based on
  2724.  * the value of 'MethodID', you dispatch to processing
  2725.  * for the various message types.  The meaningful parameter
  2726.  * packet structure definitions are defined below.
  2727.  
  2728. typedef struct
  2729.     ULONG MethodID;
  2730.      method-specific data follows, some examples below
  2731.                *Msg; }
  2732.  
  2733.   pMsg = ^tMsg;
  2734.   tMsg = record
  2735.      MethodID : ULONG;
  2736.   end;
  2737.  
  2738. {
  2739.  * Class id strings for Intuition classes.
  2740.  * There's no real reason to use the uppercase constants
  2741.  * over the lowercase strings, but this makes a good place
  2742.  * to list the names of the built-in classes.
  2743.  }
  2744. CONST
  2745.  ROOTCLASS      : PChar = 'rootclass'    ;         { classusr.h   }
  2746.  IMAGECLASS     : PChar = 'imageclass'   ;         { imageclass.h }
  2747.  FRAMEICLASS    : PChar = 'frameiclass'  ;
  2748.  SYSICLASS      : PChar = 'sysiclass'    ;
  2749.  FILLRECTCLASS  : PChar = 'fillrectclass';
  2750.  GADGETCLASS    : PChar = 'gadgetclass'  ;         { gadgetclass.h }
  2751.  PROPGCLASS     : PChar = 'propgclass'   ;
  2752.  STRGCLASS      : PChar = 'strgclass'    ;
  2753.  BUTTONGCLASS   : PChar = 'buttongclass' ;
  2754.  FRBUTTONCLASS  : PChar = 'frbuttonclass';
  2755.  GROUPGCLASS    : PChar = 'groupgclass'  ;
  2756.  ICCLASS        : PChar = 'icclass'      ;         { icclass.h    }
  2757.  MODELCLASS     : PChar = 'modelclass'   ;
  2758.  ITEXTICLASS    : PChar = 'itexticlass'  ;
  2759.  POINTERCLASS   : PChar = 'pointerclass' ;         { pointerclass.h }
  2760.  
  2761.  
  2762. { Dispatched method ID's
  2763.  * NOTE: Applications should use Intuition entry points, not direct
  2764.  * DoMethod() calls, for NewObject, DisposeObject, SetAttrs,
  2765.  * SetGadgetAttrs, and GetAttr.
  2766.  }
  2767.  
  2768.  OM_Dummy       = ($100);
  2769.  OM_NEW         = ($101); { 'object' parameter is 'true class'   }
  2770.  OM_DISPOSE     = ($102); { delete self (no parameters)          }
  2771.  OM_SET         = ($103); { set attributes (in tag list)         }
  2772.  OM_GET         = ($104); { return single attribute value        }
  2773.  OM_ADDTAIL     = ($105); { add self to a List (let root do it)  }
  2774.  OM_REMOVE      = ($106); { remove self from list                }
  2775.  OM_NOTIFY      = ($107); { send to self: notify dependents      }
  2776.  OM_UPDATE      = ($108); { notification message from somebody   }
  2777.  OM_ADDMEMBER   = ($109); { used by various classes with lists   }
  2778.  OM_REMMEMBER   = ($10A); { used by various classes with lists   }
  2779.  
  2780. { Parameter 'Messages' passed to methods       }
  2781.  
  2782. { OM_NEW and OM_SET    }
  2783. Type
  2784.    popSet = ^topSet;
  2785.    topSet = record
  2786.     MethodID            : ULONG;
  2787.     ops_AttrList        : pTagItem;    { new attributes       }
  2788.     ops_GInfo           : pGadgetInfo; { always there for gadgets,
  2789.                                          * when SetGadgetAttrs() is used,
  2790.                                          * but will be NULL for OM_NEW
  2791.                                          }
  2792.    END;
  2793.  
  2794. { OM_NOTIFY, and OM_UPDATE     }
  2795.  
  2796.   popUpdate = ^topUpdate;
  2797.   topUpdate = record
  2798.     MethodID            : ULONG;
  2799.     opu_AttrList        : pTagItem;     { new attributes       }
  2800.     opu_GInfo           : pGadgetInfo;  { non-NULL when SetGadgetAttrs OR
  2801.                                          * notification resulting from gadget
  2802.                                          * input occurs.
  2803.                                          }
  2804.     opu_Flags           : ULONG;        { defined below        }
  2805.   END;
  2806.  
  2807. { this flag means that the update message is being issued from
  2808.  * something like an active gadget, a la GACT_FOLLOWMOUSE.  When
  2809.  * the gadget goes inactive, it will issue a final update
  2810.  * message with this bit cleared.  Examples of use are for
  2811.  * GACT_FOLLOWMOUSE equivalents for propgadclass, and repeat strobes
  2812.  * for buttons.
  2813.  }
  2814. CONST
  2815.  OPUF_INTERIM   = 1;
  2816.  
  2817. { OM_GET       }
  2818. Type
  2819.  
  2820.   popGet = ^topGet;
  2821.   topGet = record
  2822.     MethodID,
  2823.     opg_AttrID          : ULONG;
  2824.     opg_Storage         : Pointer;   { may be other types, but 'int'
  2825.                                          * types are all ULONG
  2826.                                          }
  2827.   END;
  2828.  
  2829. { OM_ADDTAIL   }
  2830.  
  2831.   popAddTail = ^topAddTail;
  2832.   topAddTail = record
  2833.     MethodID  : ULONG;
  2834.     opat_List : pList;
  2835.   END;
  2836.  
  2837. { OM_ADDMEMBER, OM_REMMEMBER   }
  2838. Type
  2839.  
  2840.    popMember = ^topMember;
  2841.    topMember = record
  2842.     MethodID   : ULONG;
  2843.     opam_Object : pObject_;
  2844.    END;
  2845.  
  2846.  
  2847.  
  2848. {*****************************************}
  2849. {** 'White box' access to struct IClass **}
  2850. {*****************************************}
  2851.  
  2852. { This structure is READ-ONLY, and allocated only by Intuition }
  2853. TYPE
  2854.  
  2855.    pIClass = ^tIClass;
  2856.    tIClass = record
  2857.     cl_Dispatcher       : tHook;
  2858.     cl_Reserved         : ULONG;    { must be 0  }
  2859.     cl_Super            : pIClass;
  2860.     cl_ID               : ClassID;
  2861.  
  2862.     { where within an object is the instance data for this class? }
  2863.     cl_InstOffset       : Word;
  2864.     cl_InstSize         : Word;
  2865.  
  2866.     cl_UserData         : ULONG;    { per-class data of your choice }
  2867.     cl_SubclassCount    : ULONG;
  2868.                                         { how many direct subclasses?  }
  2869.     cl_ObjectCount      : ULONG;
  2870.                                 { how many objects created of this class? }
  2871.     cl_Flags            : ULONG;
  2872.    END;
  2873.  
  2874. CONST
  2875.  CLF_INLIST    =  $00000001;      { class is in public class list }
  2876.  
  2877.  
  2878.  
  2879. {************************************************}
  2880. {** 'White box' access to struct _Object       **}
  2881. {************************************************}
  2882.  
  2883. {
  2884.  * We have this, the instance data of the root class, PRECEDING
  2885.  * the 'object'.  This is so that Gadget objects are Gadget pointers,
  2886.  * and so on.  If this structure grows, it will always have o_Class
  2887.  * at the end, so the macro OCLASS(o) will always have the same
  2888.  * offset back from the pointer returned from NewObject().
  2889.  *
  2890.  * This data structure is subject to change.  Do not use the o_Node
  2891.  * embedded structure.
  2892.  }
  2893. Type
  2894.   p_Object = ^t_Object;
  2895.   t_Object = record
  2896.     o_Node    : tMinNode;
  2897.     o_Class   : pIClass;
  2898.   END;
  2899.  
  2900.  
  2901. {
  2902.  * NOTE:  <intuition/iobsolete.h> is included at the END of this file!
  2903.  }
  2904.  
  2905. { Gadget Class attributes      }
  2906. CONST
  2907.     GA_Dummy           =  (TAG_USER +$30000);
  2908.     GA_Left            =  (GA_Dummy + $0001);
  2909.     GA_RelRight        =  (GA_Dummy + $0002);
  2910.     GA_Top             =  (GA_Dummy + $0003);
  2911.     GA_RelBottom       =  (GA_Dummy + $0004);
  2912.     GA_Width           =  (GA_Dummy + $0005);
  2913.     GA_RelWidth        =  (GA_Dummy + $0006);
  2914.     GA_Height          =  (GA_Dummy + $0007);
  2915.     GA_RelHeight       =  (GA_Dummy + $0008);
  2916.     GA_Text            =  (GA_Dummy + $0009); { ti_Data is (UBYTE *) }
  2917.     GA_Image           =  (GA_Dummy + $000A);
  2918.     GA_Border          =  (GA_Dummy + $000B);
  2919.     GA_SelectRender    =  (GA_Dummy + $000C);
  2920.     GA_Highlight       =  (GA_Dummy + $000D);
  2921.     GA_Disabled        =  (GA_Dummy + $000E);
  2922.     GA_GZZGadget       =  (GA_Dummy + $000F);
  2923.     GA_ID              =  (GA_Dummy + $0010);
  2924.     GA_UserData        =  (GA_Dummy + $0011);
  2925.     GA_SpecialInfo     =  (GA_Dummy + $0012);
  2926.     GA_Selected        =  (GA_Dummy + $0013);
  2927.     GA_EndGadget       =  (GA_Dummy + $0014);
  2928.     GA_Immediate       =  (GA_Dummy + $0015);
  2929.     GA_RelVerify       =  (GA_Dummy + $0016);
  2930.     GA_FollowMouse     =  (GA_Dummy + $0017);
  2931.     GA_RightBorder     =  (GA_Dummy + $0018);
  2932.     GA_LeftBorder      =  (GA_Dummy + $0019);
  2933.     GA_TopBorder       =  (GA_Dummy + $001A);
  2934.     GA_BottomBorder    =  (GA_Dummy + $001B);
  2935.     GA_ToggleSelect    =  (GA_Dummy + $001C);
  2936.  
  2937.     { internal use only, until further notice, please }
  2938.     GA_SysGadget       =  (GA_Dummy + $001D);
  2939.         { bool, sets GTYP_SYSGADGET field in type      }
  2940.     GA_SysGType        =  (GA_Dummy + $001E);
  2941.         { e.g., GTYP_WUPFRONT, ...     }
  2942.  
  2943.     GA_Previous        =  (GA_Dummy + $001F);
  2944.         { previous gadget (or (struct Gadget **)) in linked list
  2945.          * NOTE: This attribute CANNOT be used to link new gadgets
  2946.          * into the gadget list of an open window or requester.
  2947.          * You must use AddGList().
  2948.          }
  2949.  
  2950.     GA_Next            =  (GA_Dummy + $0020);
  2951.          { not implemented }
  2952.  
  2953.     GA_DrawInfo        =  (GA_Dummy + $0021);
  2954.         { some fancy gadgets need to see a DrawInfo
  2955.          * when created or for layout
  2956.          }
  2957.  
  2958. { You should use at most ONE of GA_Text, GA_IntuiText, and GA_LabelImage }
  2959.  GA_IntuiText          =  (GA_Dummy + $0022);
  2960.         { ti_Data is (struct IntuiText *) }
  2961.  
  2962.  GA_LabelImage         =  (GA_Dummy + $0023);
  2963.         { ti_Data is an image (object), used in place of
  2964.          * GadgetText
  2965.          }
  2966.  
  2967.  GA_TabCycle           =  (GA_Dummy + $0024);
  2968.         { New for V37:
  2969.          * Boolean indicates that this gadget is to participate in
  2970.          * cycling activation with Tab or Shift-Tab.
  2971.          }
  2972.  
  2973.  GA_GadgetHelp         =  (GA_Dummy + $0025);
  2974.         { New for V39:
  2975.          * Boolean indicates that this gadget sends gadget-help
  2976.          }
  2977.  
  2978.  GA_Bounds             =  (GA_Dummy + $0026);
  2979.         { New for V39:
  2980.          * ti_Data is a pointer to an IBox structure which is
  2981.          * to be copied into the extended gadget's bounds.
  2982.          }
  2983.  
  2984.  GA_RelSpecial         =  (GA_Dummy + $0027);
  2985.         { New for V39:
  2986.          * Boolean indicates that this gadget has the "special relativity"
  2987.          * property, which is useful for certain fancy relativity
  2988.          * operations through the GM_LAYOUT method.
  2989.          }
  2990.  
  2991. { PROPGCLASS attributes }
  2992.  
  2993.  PGA_Dummy      = (TAG_USER + $31000);
  2994.  PGA_Freedom    = (PGA_Dummy + $0001);
  2995.         { only one of FREEVERT or FREEHORIZ }
  2996.  PGA_Borderless = (PGA_Dummy + $0002);
  2997.  PGA_HorizPot   = (PGA_Dummy + $0003);
  2998.  PGA_HorizBody  = (PGA_Dummy + $0004);
  2999.  PGA_VertPot    = (PGA_Dummy + $0005);
  3000.  PGA_VertBody   = (PGA_Dummy + $0006);
  3001.  PGA_Total      = (PGA_Dummy + $0007);
  3002.  PGA_Visible    = (PGA_Dummy + $0008);
  3003.  PGA_Top        = (PGA_Dummy + $0009);
  3004. { New for V37: }
  3005.  PGA_NewLook    = (PGA_Dummy + $000A);
  3006.  
  3007. { STRGCLASS attributes }
  3008.  
  3009.  STRINGA_Dummy         =  (TAG_USER      +$32000);
  3010.  STRINGA_MaxChars      =  (STRINGA_Dummy + $0001);
  3011.  STRINGA_Buffer        =  (STRINGA_Dummy + $0002);
  3012.  STRINGA_UndoBuffer    =  (STRINGA_Dummy + $0003);
  3013.  STRINGA_WorkBuffer    =  (STRINGA_Dummy + $0004);
  3014.  STRINGA_BufferPos     =  (STRINGA_Dummy + $0005);
  3015.  STRINGA_DispPos       =  (STRINGA_Dummy + $0006);
  3016.  STRINGA_AltKeyMap     =  (STRINGA_Dummy + $0007);
  3017.  STRINGA_Font          =  (STRINGA_Dummy + $0008);
  3018.  STRINGA_Pens          =  (STRINGA_Dummy + $0009);
  3019.  STRINGA_ActivePens    =  (STRINGA_Dummy + $000A);
  3020.  STRINGA_EditHook      =  (STRINGA_Dummy + $000B);
  3021.  STRINGA_EditModes     =  (STRINGA_Dummy + $000C);
  3022.  
  3023. { booleans }
  3024.  STRINGA_ReplaceMode    = (STRINGA_Dummy + $000D);
  3025.  STRINGA_FixedFieldMode = (STRINGA_Dummy + $000E);
  3026.  STRINGA_NoFilterMode   = (STRINGA_Dummy + $000F);
  3027.  
  3028.  STRINGA_Justification  = (STRINGA_Dummy + $0010);
  3029.         { GACT_STRINGCENTER, GACT_STRINGLEFT, GACT_STRINGRIGHT }
  3030.  STRINGA_LongVal        = (STRINGA_Dummy + $0011);
  3031.  STRINGA_TextVal        = (STRINGA_Dummy + $0012);
  3032.  
  3033.  STRINGA_ExitHelp       = (STRINGA_Dummy + $0013);
  3034.         { STRINGA_ExitHelp is new for V37, and ignored by V36.
  3035.          * Set this if you want the gadget to exit when Help is
  3036.          * pressed.  Look for a code of $5F, the rawkey code for Help
  3037.          }
  3038.  
  3039.  SG_DEFAULTMAXCHARS     = (128);
  3040.  
  3041. { Gadget Layout related attributes     }
  3042.  
  3043.  LAYOUTA_Dummy          = (TAG_USER  + $38000);
  3044.  LAYOUTA_LayoutObj      = (LAYOUTA_Dummy + $0001);
  3045.  LAYOUTA_Spacing        = (LAYOUTA_Dummy + $0002);
  3046.  LAYOUTA_Orientation    = (LAYOUTA_Dummy + $0003);
  3047.  
  3048. { orientation values   }
  3049.  LORIENT_NONE   = 0;
  3050.  LORIENT_HORIZ  = 1;
  3051.  LORIENT_VERT   = 2;
  3052.  
  3053.  
  3054. { Gadget Method ID's   }
  3055.  
  3056.  GM_Dummy      =  (-1);    { not used for anything                }
  3057.  GM_HITTEST    =  (0);     { return GMR_GADGETHIT IF you are clicked on
  3058.                                  * (whether or not you are disabled).
  3059.                                  }
  3060.  GM_RENDER      = (1);     { draw yourself, in the appropriate state }
  3061.  GM_GOACTIVE    = (2);     { you are now going to be fed input    }
  3062.  GM_HANDLEINPUT = (3);     { handle that input                    }
  3063.  GM_GOINACTIVE  = (4);     { whether or not by choice, you are done  }
  3064.  GM_HELPTEST    = (5);     { Will you send gadget help if the mouse is
  3065.                                  * at the specified coordinates?  See below
  3066.                                  * for possible GMR_ values.
  3067.                                  }
  3068.  GM_LAYOUT      = (6);     { re-evaluate your size based on the GadgetInfo
  3069.                                  * Domain.  Do NOT re-render yourself yet, you
  3070.                                  * will be called when it is time...
  3071.                                  }
  3072.  
  3073. { Parameter "Messages" passed to gadget class methods  }
  3074.  
  3075. { GM_HITTEST   }
  3076. type
  3077.  
  3078.   pgpHitTest = ^tgpHitTest;
  3079.   tgpHitTest = record
  3080.     MethodID  : ULONG;
  3081.     gpht_GInfo : pGadgetInfo;
  3082.     gpht_Mouse : record
  3083.              x : Integer;
  3084.              y : Integer;
  3085.                  end;
  3086.   END;
  3087.  
  3088. const
  3089. { For GM_HITTEST, return GMR_GADGETHIT if you were indeed hit,
  3090.  * otherwise return zero.
  3091.  *
  3092.  * For GM_HELPTEST, return GMR_NOHELPHIT (zero) if you were not hit.
  3093.  * Typically, return GMR_HELPHIT if you were hit.
  3094.  * It is possible to pass a UWORD to the application via the Code field
  3095.  * of the IDCMP_GADGETHELP message.  Return GMR_HELPCODE or'd with
  3096.  * the UWORD-sized result you wish to return.
  3097.  *
  3098.  * GMR_HELPHIT yields a Code value of ((UWORD) ~0), which should
  3099.  * mean "nothing particular" to the application.
  3100.  }
  3101.  
  3102.  GMR_GADGETHIT  = ($00000004);    { GM_HITTEST hit }
  3103.  
  3104.  GMR_NOHELPHIT  = ($00000000);    { GM_HELPTEST didn't hit }
  3105.  GMR_HELPHIT    = ($FFFFFFFF);    { GM_HELPTEST hit, return code = ~0 }
  3106.  GMR_HELPCODE   = ($00010000);    { GM_HELPTEST hit, return low word as code }
  3107.  
  3108.  
  3109. { GM_RENDER    }
  3110. Type
  3111.    pgpRender = ^tgpRender;
  3112.    tgpRender = record
  3113.     MethodID  : ULONG;
  3114.     gpr_GInfo : pGadgetInfo;      { gadget context               }
  3115.     gpr_RPort : pRastPort;        { all ready for use            }
  3116.     gpr_Redraw : Longint;           { might be a "highlight pass"  }
  3117.    END;
  3118.  
  3119. { values of gpr_Redraw }
  3120. CONST
  3121.  GREDRAW_UPDATE = (2);     { incremental update, e.g. prop slider }
  3122.  GREDRAW_REDRAW = (1);     { redraw gadget        }
  3123.  GREDRAW_TOGGLE = (0);     { toggle highlight, IF applicable      }
  3124.  
  3125. { GM_GOACTIVE, GM_HANDLEINPUT  }
  3126. Type
  3127.  
  3128.   pgpInput = ^tgpInput;
  3129.   tgpInput = record
  3130.     MethodID : ULONG;
  3131.     gpi_GInfo : pGadgetInfo;
  3132.     gpi_IEvent : pInputEvent;
  3133.     gpi_Termination : Pointer;
  3134.     gpi_Mouse : record
  3135.             x : Integer;
  3136.             y : Integer;
  3137.                 end;
  3138.     {* (V39) Pointer to TabletData structure, if this event originated
  3139.      * from a tablet which sends IESUBCLASS_NEWTABLET events, or NULL if
  3140.      * not.
  3141.      *
  3142.      * DO NOT ATTEMPT TO READ THIS FIELD UNDER INTUITION PRIOR TO V39!
  3143.      * IT WILL BE INVALID!
  3144.      *}
  3145.    gpi_TabletData  : pTabletData;
  3146.   END;
  3147.  
  3148. { GM_HANDLEINPUT and GM_GOACTIVE  return code flags    }
  3149. { return GMR_MEACTIVE (0) alone if you want more input.
  3150.  * Otherwise, return ONE of GMR_NOREUSE and GMR_REUSE, and optionally
  3151.  * GMR_VERIFY.
  3152.  }
  3153. CONST
  3154.  GMR_MEACTIVE  =  (0);
  3155.  GMR_NOREUSE   =  (2);
  3156.  GMR_REUSE     =  (4);
  3157.  GMR_VERIFY    =  (8);        { you MUST set cgp_Termination }
  3158.  
  3159. { New for V37:
  3160.  * You can end activation with one of GMR_NEXTACTIVE and GMR_PREVACTIVE,
  3161.  * which instructs Intuition to activate the next or previous gadget
  3162.  * that has GFLG_TABCYCLE set.
  3163.  }
  3164.  GMR_NEXTACTIVE = (16);
  3165.  GMR_PREVACTIVE = (32);
  3166.  
  3167. { GM_GOINACTIVE }
  3168. Type
  3169.  
  3170.    pgpGoInactive = ^tgpGoInactive;
  3171.    tgpGoInactive = record
  3172.     MethodID    : ULONG;
  3173.     gpgi_GInfo  : pGadgetInfo;
  3174.  
  3175.     { V37 field only!  DO NOT attempt to read under V36! }
  3176.     gpgi_Abort  : ULONG;               { gpgi_Abort=1 IF gadget was aborted
  3177.                                          * by Intuition and 0 if gadget went
  3178.                                          * inactive at its own request
  3179.                                          }
  3180.    END;
  3181.  
  3182. {* New for V39: Intuition sends GM_LAYOUT to any GREL_ gadget when
  3183.  * the gadget is added to the window (or when the window opens, if
  3184.  * the gadget was part of the NewWindow.FirstGadget or the WA_Gadgets
  3185.  * list), or when the window is resized.  Your gadget can set the
  3186.  * GA_RelSpecial property to get GM_LAYOUT events without Intuition
  3187.  * changing the interpretation of your gadget select box.  This
  3188.  * allows for completely arbitrary resizing/repositioning based on
  3189.  * window size.
  3190.  *}
  3191. {* GM_LAYOUT *}
  3192. Type
  3193.  
  3194.  pgpLayout = ^tgpLayout;
  3195.  tgpLayout = record
  3196.     MethodID            : ULONG;
  3197.     gpl_GInfo           : pGadgetInfo;
  3198.     gpl_Initial         : ULONG;      {* non-zero if this method was invoked
  3199.                                          * during AddGList() or OpenWindow()
  3200.                                          * time.  zero if this method was invoked
  3201.                                          * during window resizing.
  3202.                                          *}
  3203.  end;
  3204.  
  3205.  
  3206. CONST
  3207.  ICM_Dummy      = ($0401);       { used for nothing             }
  3208.  ICM_SETLOOP    = ($0402);       { set/increment loop counter   }
  3209.  ICM_CLEARLOOP  = ($0403);       { clear/decrement loop counter }
  3210.  ICM_CHECKLOOP  = ($0404);       { set/increment loop           }
  3211.  
  3212. { no parameters for ICM_SETLOOP, ICM_CLEARLOOP, ICM_CHECKLOOP  }
  3213.  
  3214. { interconnection attributes used by icclass, modelclass, and gadgetclass }
  3215.  ICA_Dummy      = (TAG_USER+$40000);
  3216.  ICA_TARGET     = (ICA_Dummy + 1);
  3217.         { interconnection target               }
  3218.  ICA_MAP        = (ICA_Dummy + 2);
  3219.         { interconnection map tagitem list     }
  3220.  ICSPECIAL_CODE = (ICA_Dummy + 3);
  3221.         { a "pseudo-attribute", see below.     }
  3222.  
  3223. { Normally, the value for ICA_TARGET is some object pointer,
  3224.  * but if you specify the special value ICTARGET_IDCMP, notification
  3225.  * will be send as an IDCMP_IDCMPUPDATE message to the appropriate window's
  3226.  * IDCMP port.  See the definition of IDCMP_IDCMPUPDATE.
  3227.  *
  3228.  * When you specify ICTARGET_IDCMP for ICA_TARGET, the map you
  3229.  * specify will be applied to derive the attribute list that is
  3230.  * sent with the IDCMP_IDCMPUPDATE message.  If you specify a map list
  3231.  * which results in the attribute tag id ICSPECIAL_CODE, the
  3232.  * lower sixteen bits of the corresponding ti_Data value will
  3233.  * be copied into the Code field of the IDCMP_IDCMPUPDATE IntuiMessage.
  3234.  }
  3235.  ICTARGET_IDCMP = (NOT 0);
  3236.  
  3237.  
  3238. CONST
  3239.  CUSTOMIMAGEDEPTH     =   (-1);
  3240. { if image.Depth is this, it's a new Image class object }
  3241.  
  3242.  
  3243. {****************************************************}
  3244. CONST
  3245.  IA_Dummy             =   (TAG_USER + $20000);
  3246.  IA_Left              =   (IA_Dummy + $01);
  3247.  IA_Top               =   (IA_Dummy + $02);
  3248.  IA_Width             =   (IA_Dummy + $03);
  3249.  IA_Height            =   (IA_Dummy + $04);
  3250.  IA_FGPen             =   (IA_Dummy + $05);
  3251.                     { IA_FGPen also means "PlanePick"  }
  3252.  IA_BGPen             =   (IA_Dummy + $06);
  3253.                     { IA_BGPen also means "PlaneOnOff" }
  3254.  IA_Data              =   (IA_Dummy + $07);
  3255.                     { bitplanes, for classic image,
  3256.                      * other image classes may use it for other things
  3257.                      }
  3258.  IA_LineWidth         =   (IA_Dummy + $08);
  3259.  IA_Pens              =   (IA_Dummy + $0E);
  3260.                     { pointer to UWORD pens[],
  3261.                      * ala DrawInfo.Pens, MUST be
  3262.                      * terminated by ~0.  Some classes can
  3263.                      * choose to have this, or SYSIA_DrawInfo,
  3264.                      * or both.
  3265.                      }
  3266.  IA_Resolution        =   (IA_Dummy + $0F);
  3267.                     { packed uwords for x/y resolution into a longword
  3268.                      * ala DrawInfo.Resolution
  3269.                      }
  3270.  
  3271. {*** see class documentation to learn which    ****}
  3272. {*** classes recognize these                   ****}
  3273.  IA_APattern           =  (IA_Dummy + $10);
  3274.  IA_APatSize           =  (IA_Dummy + $11);
  3275.  IA_Mode               =  (IA_Dummy + $12);
  3276.  IA_Font               =  (IA_Dummy + $13);
  3277.  IA_Outline            =  (IA_Dummy + $14);
  3278.  IA_Recessed           =  (IA_Dummy + $15);
  3279.  IA_DoubleEmboss       =  (IA_Dummy + $16);
  3280.  IA_EdgesOnly          =  (IA_Dummy + $17);
  3281.  
  3282. {*** "sysiclass" attributes                    ****}
  3283.  SYSIA_Size            =  (IA_Dummy + $0B);
  3284.                     { 's below          }
  3285.  SYSIA_Depth           =  (IA_Dummy + $0C);
  3286.                     { this is unused by Intuition.  SYSIA_DrawInfo
  3287.                      * is used instead for V36
  3288.                      }
  3289.  SYSIA_Which           =  (IA_Dummy + $0D);
  3290.                     { see 's below      }
  3291.  SYSIA_DrawInfo        =  (IA_Dummy + $18);
  3292.                     { pass to sysiclass, please }
  3293.  
  3294. {****  obsolete: don't use these, use IA_Pens  ****}
  3295.  SYSIA_Pens            =  IA_Pens;
  3296.  IA_ShadowPen          =  (IA_Dummy + $09);
  3297.  IA_HighlightPen       =  (IA_Dummy + $0A);
  3298.  
  3299. { New for V39: }
  3300.  SYSIA_ReferenceFont   =  (IA_Dummy + $19);
  3301.                     { Font to use as reference for scaling
  3302.                      * certain sysiclass images
  3303.                      }
  3304.  IA_SupportsDisable    =  (IA_Dummy + $1a);
  3305.                     { By default, Intuition ghosts gadgets itself,
  3306.                      * instead of relying on IDS_DISABLED or
  3307.                      * IDS_SELECTEDDISABLED.  An imageclass that
  3308.                      * supports these states should return this attribute
  3309.                      * as TRUE.  You cannot set or clear this attribute,
  3310.                      * however.
  3311.                      }
  3312.  
  3313.  IA_FrameType          =  (IA_Dummy + $1b);
  3314.                     { Starting with V39, FrameIClass recognizes
  3315.                      * several standard types of frame.  Use one
  3316.                      * of the FRAME_ specifiers below.  Defaults
  3317.                      * to FRAME_DEFAULT.
  3318.                      }
  3319.  
  3320. {* next attribute: (IA_Dummy + $1c)   *}
  3321.  
  3322. {***********************************************}
  3323.  
  3324. { data values for SYSIA_Size   }
  3325.  SYSISIZE_MEDRES = (0);
  3326.  SYSISIZE_LOWRES = (1);
  3327.  SYSISIZE_HIRES  = (2);
  3328.  
  3329. {
  3330.  * SYSIA_Which tag data values:
  3331.  * Specifies which system gadget you want an image for.
  3332.  * Some numbers correspond to internal Intuition s
  3333.  }
  3334.  DEPTHIMAGE     = ($00);
  3335.  ZOOMIMAGE      = ($01);
  3336.  SIZEIMAGE      = ($02);
  3337.  CLOSEIMAGE     = ($03);
  3338.  SDEPTHIMAGE    = ($05); { screen depth gadget }
  3339.  LEFTIMAGE      = ($0A);
  3340.  UPIMAGE        = ($0B);
  3341.  RIGHTIMAGE     = ($0C);
  3342.  DOWNIMAGE      = ($0D);
  3343.  CHECKIMAGE     = ($0E);
  3344.  MXIMAGE        = ($0F); { mutual exclude "button" }
  3345. {* New for V39: *}
  3346.  MENUCHECK      = ($10); { Menu checkmark image }
  3347.  AMIGAKEY       = ($11); { Menu Amiga-key image }
  3348.  
  3349.  
  3350. { image message id's   }
  3351.     IM_DRAW     = $202;  { draw yourself, with "state"          }
  3352.     IM_HITTEST  = $203;  { return TRUE IF click hits image      }
  3353.     IM_ERASE    = $204;  { erase yourself                       }
  3354.     IM_MOVE     = $205;  { draw new AND erase old, smoothly     }
  3355.  
  3356.     IM_DRAWFRAME= $206;  { draw with specified dimensions       }
  3357.     IM_FRAMEBOX = $207;  { get recommended frame around some box}
  3358.     IM_HITFRAME = $208;  { hittest with dimensions              }
  3359.     IM_ERASEFRAME= $209; { hittest with dimensions              }
  3360.  
  3361. { image draw states or styles, for IM_DRAW }
  3362.     IDS_NORMAL          = (0);
  3363.     IDS_SELECTED        = (1);    { for selected gadgets     }
  3364.     IDS_DISABLED        = (2);    { for disabled gadgets     }
  3365.     IDS_BUSY            = (3);    { for future functionality }
  3366.     IDS_INDETERMINATE   = (4);    { for future functionality }
  3367.     IDS_INACTIVENORMAL  = (5);    { normal, in inactive window border }
  3368.     IDS_INACTIVESELECTED= (6);    { selected, in inactive border }
  3369.     IDS_INACTIVEDISABLED= (7);    { disabled, in inactive border }
  3370.  
  3371. { oops, please forgive spelling error by jimm }
  3372.  IDS_INDETERMINANT = IDS_INDETERMINATE;
  3373.  
  3374. { IM_FRAMEBOX  }
  3375. Type
  3376.  
  3377.   pimpFrameBox = ^timpFrameBox;
  3378.   timpFrameBox = record
  3379.     MethodID   : ULONG;
  3380.     imp_ContentsBox  : pIBox;       { input: relative box of contents }
  3381.     imp_FrameBox     : pIBox;          { output: rel. box of encl frame  }
  3382.     imp_DrInfo       : pDrawInfo;
  3383.     imp_FrameFlags   : ULONG;
  3384.   END;
  3385.  
  3386. CONST
  3387.  FRAMEF_SPECIFY = (1);  { Make do with the dimensions of FrameBox
  3388.                                  * provided.
  3389.                                  }
  3390.  
  3391. { IM_DRAW, IM_DRAWFRAME        }
  3392. Type
  3393.  
  3394.    pimpDraw = ^timpDraw;
  3395.    timpDraw = record
  3396.     MethodID    : ULONG;
  3397.     imp_RPort   : pRastPort;
  3398.     imp_Offset  : record
  3399.               x : Word;
  3400.               y : Word;
  3401.                   end;
  3402.     imp_State   : ULONG;
  3403.     imp_DrInfo  : pDrawInfo;
  3404.  
  3405.     { these parameters only valid for IM_DRAWFRAME }
  3406.     imp_Dimensions : record
  3407.              Width : Word;
  3408.             Height : Word;
  3409.                      end;
  3410.    END;
  3411.  
  3412. { IM_ERASE, IM_ERASEFRAME      }
  3413. { NOTE: This is a subset of impDraw    }
  3414.  
  3415.    pimpErase = ^timpErase;
  3416.    timpErase = record
  3417.     MethodID       : ULONG;
  3418.     imp_RPort      : pRastPort;
  3419.     imp_Offset     : record
  3420.                  x : Word;
  3421.                  y : Word;
  3422.                      end;
  3423.  
  3424.     { these parameters only valid for IM_ERASEFRAME }
  3425.     imp_Dimensions : record
  3426.              Width : Word;
  3427.             Height : Word;
  3428.                      end;
  3429.    END;
  3430.  
  3431. { IM_HITTEST, IM_HITFRAME      }
  3432.  
  3433.    pimpHitTest = ^timpHitTest;
  3434.    timpHitTest = record
  3435.     MethodID   : ULONG;
  3436.     imp_Point  : record
  3437.              x : Word;
  3438.              y : Word;
  3439.                  end;
  3440.  
  3441.     { these parameters only valid for IM_HITFRAME }
  3442.     imp_Dimensions : record
  3443.                Width : Word;
  3444.                Height : Word;
  3445.                end;
  3446.    END;
  3447.  
  3448.  { **  'boopsi' pointer class interface }
  3449.  
  3450. const
  3451. { The following tags are recognized at NewObject() time by
  3452.  * pointerclass:
  3453.  *
  3454.  * POINTERA_BitMap (struct BitMap *) - Pointer to bitmap to
  3455.  *      get pointer imagery from.  Bitplane data need not be
  3456.  *      in chip RAM.
  3457.  * POINTERA_XOffset (LONG) - X-offset of the pointer hotspot.
  3458.  * POINTERA_YOffset (LONG) - Y-offset of the pointer hotspot.
  3459.  * POINTERA_WordWidth (ULONG) - designed width of the pointer in words
  3460.  * POINTERA_XResolution (ULONG) - one of the POINTERXRESN_ flags below
  3461.  * POINTERA_YResolution (ULONG) - one of the POINTERYRESN_ flags below
  3462.  *
  3463.  }
  3464.  
  3465.  POINTERA_Dummy = (TAG_USER + $39000);
  3466.  
  3467.  POINTERA_BitMap        = (POINTERA_Dummy + $01);
  3468.  POINTERA_XOffset       = (POINTERA_Dummy + $02);
  3469.  POINTERA_YOffset       = (POINTERA_Dummy + $03);
  3470.  POINTERA_WordWidth     = (POINTERA_Dummy + $04);
  3471.  POINTERA_XResolution   = (POINTERA_Dummy + $05);
  3472.  POINTERA_YResolution   = (POINTERA_Dummy + $06);
  3473.  
  3474. { These are the choices for the POINTERA_XResolution attribute which
  3475.  * will determine what resolution pixels are used for this pointer.
  3476.  *
  3477.  * POINTERXRESN_DEFAULT (ECS-compatible pointer width)
  3478.  *      = 70 ns if SUPERHIRES-type mode, 140 ns if not
  3479.  *
  3480.  * POINTERXRESN_SCREENRES
  3481.  *      = Same as pixel speed of screen
  3482.  *
  3483.  * POINTERXRESN_LORES (pointer always in lores-like pixels)
  3484.  *      = 140 ns in 15kHz modes, 70 ns in 31kHz modes
  3485.  *
  3486.  * POINTERXRESN_HIRES (pointer always in hires-like pixels)
  3487.  *      = 70 ns in 15kHz modes, 35 ns in 31kHz modes
  3488.  *
  3489.  * POINTERXRESN_140NS (pointer always in 140 ns pixels)
  3490.  *      = 140 ns always
  3491.  *
  3492.  * POINTERXRESN_70NS (pointer always in 70 ns pixels)
  3493.  *      = 70 ns always
  3494.  *
  3495.  * POINTERXRESN_35NS (pointer always in 35 ns pixels)
  3496.  *      = 35 ns always
  3497.  }
  3498.  
  3499.  POINTERXRESN_DEFAULT   = 0;
  3500.  POINTERXRESN_140NS     = 1;
  3501.  POINTERXRESN_70NS      = 2;
  3502.  POINTERXRESN_35NS      = 3;
  3503.  
  3504.  POINTERXRESN_SCREENRES = 4;
  3505.  POINTERXRESN_LORES     = 5;
  3506.  POINTERXRESN_HIRES     = 6;
  3507.  
  3508. { These are the choices for the POINTERA_YResolution attribute which
  3509.  * will determine what vertical resolution is used for this pointer.
  3510.  *
  3511.  * POINTERYRESN_DEFAULT
  3512.  *      = In 15 kHz modes, the pointer resolution will be the same
  3513.  *        as a non-interlaced screen.  In 31 kHz modes, the pointer
  3514.  *        will be doubled vertically.  This means there will be about
  3515.  *        200-256 pointer lines per screen.
  3516.  *
  3517.  * POINTERYRESN_HIGH
  3518.  * POINTERYRESN_HIGHASPECT
  3519.  *      = Where the hardware/software supports it, the pointer resolution
  3520.  *        will be high.  This means there will be about 400-480 pointer
  3521.  *        lines per screen.  POINTERYRESN_HIGHASPECT also means that
  3522.  *        when the pointer comes out double-height due to hardware/software
  3523.  *        restrictions, its width would be doubled as well, if possible
  3524.  *        (to preserve aspect).
  3525.  *
  3526.  * POINTERYRESN_SCREENRES
  3527.  * POINTERYRESN_SCREENRESASPECT
  3528.  *      = Will attempt to match the vertical resolution of the pointer
  3529.  *        to the screen's vertical resolution.  POINTERYRESN_SCREENASPECT also
  3530.  *        means that when the pointer comes out double-height due to
  3531.  *        hardware/software restrictions, its width would be doubled as well,
  3532.  *        if possible (to preserve aspect).
  3533.  *
  3534.  }
  3535.  
  3536.  POINTERYRESN_DEFAULT          =  0;
  3537.  POINTERYRESN_HIGH             =  2;
  3538.  POINTERYRESN_HIGHASPECT       =  3;
  3539.  POINTERYRESN_SCREENRES        =  4;
  3540.  POINTERYRESN_SCREENRESASPECT  =  5;
  3541.  
  3542. { Compatibility note:
  3543.  *
  3544.  * The AA chipset supports variable sprite width and resolution, but
  3545.  * the setting of width and resolution is global for all sprites.
  3546.  * When no other sprites are in use, Intuition controls the sprite
  3547.  * width and sprite resolution for correctness based on pointerclass
  3548.  * attributes specified by the creator of the pointer.  Intuition
  3549.  * controls sprite resolution with the VTAG_DEFSPRITERESN_SET tag
  3550.  * to VideoControl().  Applications can override this on a per-viewport
  3551.  * basis with the VTAG_SPRITERESN_SET tag to VideoControl().
  3552.  *
  3553.  * If an application uses a sprite other than the pointer sprite,
  3554.  * Intuition will automatically regenerate the pointer sprite's image in
  3555.  * a compatible width.  This might involve BitMap scaling of the imagery
  3556.  * you supply.
  3557.  *
  3558.  * If any sprites other than the pointer sprite were obtained with the
  3559.  * old GetSprite() call, Intuition assumes that the owner of those
  3560.  * sprites is unaware of sprite resolution, hence Intuition will set the
  3561.  * default sprite resolution (VTAG_DEFSPRITERESN_SET) to ECS-compatible,
  3562.  * instead of as requested by the various pointerclass attributes.
  3563.  *
  3564.  * No resolution fallback occurs when applications use ExtSprites.
  3565.  * Such applications are expected to use VTAG_SPRITERESN_SET tag if
  3566.  * necessary.
  3567.  *
  3568.  * NB:  Under release V39, only sprite width compatibility is implemented.
  3569.  * Sprite resolution compatibility was added for V40.
  3570.  }
  3571.  
  3572.  
  3573. Type
  3574.  
  3575.    pStringExtend = ^tStringExtend;
  3576.    tStringExtend = record
  3577.     { display specifications   }
  3578.     Font        : pTextFont;      { must be an open Font (not TextAttr)  }
  3579.     Pens        : Array[0..1] of Byte;        { color of text/backgroun              }
  3580.     ActivePens  : Array[0..1] of Byte;  { colors when gadget is active         }
  3581.  
  3582.     { edit specifications      }
  3583.     InitialModes : ULONG;   { initial mode flags, below            }
  3584.     EditHook     : pHook;      { IF non-NULL, must supply WorkBuffer  }
  3585.     WorkBuffer   : STRPTR;    { must be as large as StringInfo.Buffer}
  3586.  
  3587.     Reserved     : Array[0..3] of ULONG;    { set to 0                             }
  3588.    END;
  3589.  
  3590.    pSGWork = ^tSGWork;
  3591.    tSGWork = record
  3592.     { set up when gadget is first activated    }
  3593.     Gad       : pGadget;         { the contestant itself        }   { Gadget in C-Includes }
  3594.     StrInfo   : pStringInfo;     { easy access to sinfo         }   { StrInfo in C-Includes }
  3595.     WorkBuffer : STRPTR;           { intuition's planned result   }
  3596.     PrevBuffer : STRPTR;           { what was there before        }
  3597.     Modes      : ULONG;          { current mode                 }
  3598.  
  3599.     { modified for each input event    }
  3600.     IEvent     : pInputEvent;    { actual event: do not change  }
  3601.     Code       : Word;            { character code, IF one byte  }
  3602.     BufferPos  : Integer;            { cursor position              }
  3603.     NumChars   : Integer;
  3604.     Actions    : ULONG;          { what Intuition will do       }
  3605.     LongInt_   : Longint;          { temp storage for longint     }
  3606.  
  3607.     GInfo      : pGadgetInfo;    { see cghooks.h                }   { GadgetInfo in C-Includes }
  3608.     EditOp     : Word;            { from constants below         }
  3609.    END;
  3610.  
  3611. { SGWork.EditOp -
  3612.  * These values indicate what basic type of operation the global
  3613.  * editing hook has performed on the string before your gadget's custom
  3614.  * editing hook gets called.  You do not have to be concerned with the
  3615.  * value your custom hook leaves in the EditOp field, only if you
  3616.  * write a global editing hook.
  3617.  *
  3618.  * For most of these general edit operations, you'll want to compare
  3619.  * the BufferPos and NumChars of the StringInfo (before global editing)
  3620.  * and SGWork (after global editing).
  3621.  }
  3622.  
  3623. CONST
  3624.  EO_NOOP       =  ($0001);
  3625.         { did nothing                                                  }
  3626.  EO_DELBACKWARD=  ($0002);
  3627.         { deleted some chars (maybe 0).                                }
  3628.  EO_DELFORWARD =  ($0003);
  3629.         { deleted some characters under and in front of the cursor     }
  3630.  EO_MOVECURSOR =  ($0004);
  3631.         { moved the cursor                                             }
  3632.  EO_ENTER      =  ($0005);
  3633.         { "enter" or "return" key, terminate                           }
  3634.  EO_RESET      =  ($0006);
  3635.         { current Intuition-style undo                                 }
  3636.  EO_REPLACECHAR=  ($0007);
  3637.         { replaced one character and (maybe) advanced cursor           }
  3638.  EO_INSERTCHAR =  ($0008);
  3639.         { inserted one char into string or added one at end            }
  3640.  EO_BADFORMAT  =  ($0009);
  3641.         { didn't like the text data, e.g., Bad LONGINT                 }
  3642.  EO_BIGCHANGE  =  ($000A);        { unused by Intuition  }
  3643.         { complete or major change to the text, e.g. new string        }
  3644.  EO_UNDO       =  ($000B);        { unused by Intuition  }
  3645.         { some other style of undo                                     }
  3646.  EO_CLEAR      =  ($000C);
  3647.         { clear the string                                             }
  3648.  EO_SPECIAL    =  ($000D);        { unused by Intuition  }
  3649.         { some operation that doesn't fit into the categories here     }
  3650.  
  3651.  
  3652. { Mode Flags definitions (ONLY first group allowed as InitialModes)    }
  3653.  SGM_REPLACE   =  (1);       { replace mode                 }
  3654. { please initialize StringInfo with in-range value of BufferPos
  3655.  * if you are using SGM_REPLACE mode.
  3656.  }
  3657.  
  3658.  SGM_FIXEDFIELD = (2);       { fixed length buffer          }
  3659.                                         { always set SGM_REPLACE, too  }
  3660.  SGM_NOFILTER   = (4);       { don't filter control chars   }
  3661.  
  3662. { SGM_EXITHELP is new for V37, and ignored by V36: }
  3663.  SGM_EXITHELP   = (128);       { exit with code = $5F IF HELP hit }
  3664.  
  3665.  
  3666. { These Mode Flags are for internal use only                           }
  3667.  SGM_NOCHANGE   = (8);       { no edit changes yet          }
  3668.  SGM_NOWORKB    = (16);       { Buffer == PrevBuffer         }
  3669.  SGM_CONTROL    = (32);       { control char escape mode     }
  3670.  SGM_LONGINT    = (64);       { an intuition longint gadget  }
  3671.  
  3672. { String Gadget Action Flags (put in SGWork.Actions by EditHook)       }
  3673.  SGA_USE        = ($1);  { use contents of SGWork               }
  3674.  SGA_END        = ($2);  { terminate gadget, code in Code field }
  3675.  SGA_BEEP       = ($4);  { flash the screen for the user        }
  3676.  SGA_REUSE      = ($8);  { reuse input event                    }
  3677.  SGA_REDISPLAY  = ($10); { gadget visuals changed               }
  3678.  
  3679. { New for V37: }
  3680.  SGA_NEXTACTIVE = ($20); { Make next possible gadget active.    }
  3681.  SGA_PREVACTIVE = ($40); { Make previous possible gadget active.}
  3682.  
  3683. { function id for only existing custom string gadget edit hook }
  3684.  
  3685.  SGH_KEY        = (1);    { process editing keystroke            }
  3686.  SGH_CLICK      = (2);    { process mouse click cursor position  }
  3687.  
  3688. { Here's a brief summary of how the custom string gadget edit hook works:
  3689.  *      You provide a hook in StringInfo.Extension.EditHook.
  3690.  *      The hook is called in the standard way with the 'object'
  3691.  *      a pointer to SGWork, and the 'message' a pointer to a command
  3692.  *      block, starting either with (longword) SGH_KEY, SGH_CLICK,
  3693.  *      or something new.
  3694.  *
  3695.  *      You return 0 if you don't understand the command (SGH_KEY is
  3696.  *      required and assumed).  Return non-zero if you implement the
  3697.  *      command.
  3698.  *
  3699.  *   SGH_KEY:
  3700.  *      There are no parameters following the command longword.
  3701.  *
  3702.  *      Intuition will put its idea of proper values in the SGWork
  3703.  *      before calling you, and if you leave SGA_USE set in the
  3704.  *      SGWork.Actions field, Intuition will use the values
  3705.  *      found in SGWork fields WorkBuffer, NumChars, BufferPos,
  3706.  *      and LongInt, copying the WorkBuffer back to the StringInfo
  3707.  *      Buffer.
  3708.  *
  3709.  *      NOTE WELL: You may NOT change other SGWork fields.
  3710.  *
  3711.  *      If you clear SGA_USE, the string gadget will be unchanged.
  3712.  *
  3713.  *      If you set SGA_END, Intuition will terminate the activation
  3714.  *      of the string gadget.  If you also set SGA_REUSE, Intuition
  3715.  *      will reuse the input event after it deactivates your gadget.
  3716.  *
  3717.  *      In this case, Intuition will put the value found in SGWork.Code
  3718.  *      into the IntuiMessage.Code field of the IDCMP_GADGETUP message it
  3719.  *      sends to the application.
  3720.  *
  3721.  *      If you set SGA_BEEP, Intuition will call DisplayBeep(); use
  3722.  *      this if the user has typed in error, or buffer is full.
  3723.  *
  3724.  *      Set SGA_REDISPLAY if the changes to the gadget warrant a
  3725.  *      gadget redisplay.  Note: cursor movement requires a redisplay.
  3726.  *
  3727.  *      Starting in V37, you may set SGA_PREVACTIVE or SGA_NEXTACTIVE
  3728.  *      when you set SGA_END.  This tells Intuition that you want
  3729.  *      the next or previous gadget with GFLG_TABCYCLE to be activated.
  3730.  *
  3731.  *   SGH_CLICK:
  3732.  *      This hook command is called when Intuition wants to position
  3733.  *      the cursor in response to a mouse click in the string gadget.
  3734.  *
  3735.  *      Again, here are no parameters following the command longword.
  3736.  *
  3737.  *      This time, Intuition has already calculated the mouse position
  3738.  *      character cell and put it in SGWork.BufferPos.  The previous
  3739.  *      BufferPos value remains in the SGWork.StringInfo.BufferPos.
  3740.  *
  3741.  *      Intuition will again use the SGWork fields listed above for
  3742.  *      SGH_KEY.  One restriction is that you are NOT allowed to set
  3743.  *      SGA_END or SGA_REUSE for this command.  Intuition will not
  3744.  *      stand for a gadget which goes inactive when you click in it.
  3745.  *
  3746.  *      You should always leave the SGA_REDISPLAY flag set, since Intuition
  3747.  *      uses this processing when activating a string gadget.
  3748.  }
  3749.  
  3750. FUNCTION ActivateGadget(gadgets : pGadget; window : pWindow; requester : pRequester) : BOOLEAN;
  3751. PROCEDURE ActivateWindow(window : pWindow);
  3752. PROCEDURE AddClass(classPtr : pIClass);
  3753. FUNCTION AddGadget(window : pWindow; gadget : pGadget; position : ULONG) : WORD;
  3754. FUNCTION AddGList(window : pWindow; gadget : pGadget; position : ULONG; numGad : LONGINT; requester : pRequester) : WORD;
  3755. FUNCTION AllocRemember(VAR rememberKey : pRemember; size : ULONG; flags : ULONG) : POINTER;
  3756. FUNCTION AllocScreenBuffer(sc : pScreen; bm : pBitMap; flags : ULONG) : pScreenBuffer;
  3757. FUNCTION AutoRequest(window : pWindow; body : pIntuiText; posText : pIntuiText; negText : pIntuiText; pFlag : ULONG; nFlag : ULONG; width : ULONG; height : ULONG) : BOOLEAN;
  3758. PROCEDURE BeginRefresh(window : pWindow);
  3759. FUNCTION BuildEasyRequestArgs(window : pWindow; easyStruct : pEasyStruct; idcmp : ULONG; args : POINTER) : pWindow;
  3760. FUNCTION BuildSysRequest(window : pWindow; body : pIntuiText; posText : pIntuiText; negText : pIntuiText; flags : ULONG; width : ULONG; height : ULONG) : pWindow;
  3761. FUNCTION ChangeScreenBuffer(sc : pScreen; sb : pScreenBuffer) : ULONG;
  3762. PROCEDURE ChangeWindowBox(window : pWindow; left : LONGINT; top : LONGINT; width : LONGINT; height : LONGINT);
  3763. FUNCTION ClearDMRequest(window : pWindow) : BOOLEAN;
  3764. PROCEDURE ClearMenuStrip(window : pWindow);
  3765. PROCEDURE ClearPointer(window : pWindow);
  3766. PROCEDURE CloseScreen(screen : pScreen);
  3767. PROCEDURE CloseWindow(window : pWindow);
  3768. FUNCTION CloseWorkBench : BOOLEAN;
  3769. PROCEDURE CurrentTime(VAR seconds : ULONG; VAR micros : ULONG);
  3770. FUNCTION DisplayAlert(alertNumber : ULONG; string_ : pCHAR; height : ULONG) : BOOLEAN;
  3771. PROCEDURE DisplayBeep(screen : pScreen);
  3772. PROCEDURE DisposeObject(obj : POINTER);
  3773. FUNCTION DoGadgetMethodA(gad : pGadget; win : pWindow; req : pRequester; message : tMsg) : ULONG;
  3774. FUNCTION DoubleClick(sSeconds : ULONG; sMicros : ULONG; cSeconds : ULONG; cMicros : ULONG) : BOOLEAN;
  3775. PROCEDURE DrawBorder(rp : pRastPort; border : pBorder; leftOffset : LONGINT; topOffset : LONGINT);
  3776. PROCEDURE DrawImage(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT);
  3777. PROCEDURE DrawImageState(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT; state : ULONG; drawInfo : pDrawInfo);
  3778. FUNCTION EasyRequestArgs(window : pWindow; easyStruct : pEasyStruct; idcmpPtr : ULONG; args : POINTER) : LONGINT;
  3779. PROCEDURE EndRefresh(window : pWindow; complete : LONGINT);
  3780. PROCEDURE EndRequest(requester : pRequester; window : pWindow);
  3781. PROCEDURE EraseImage(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT);
  3782. FUNCTION FreeClass(classPtr : pIClass) : BOOLEAN;
  3783. PROCEDURE FreeRemember(VAR rememberKey : pRemember; reallyForget : LONGINT);
  3784. PROCEDURE FreeScreenBuffer(sc : pScreen; sb : pScreenBuffer);
  3785. PROCEDURE FreeScreenDrawInfo(screen : pScreen; drawInfo : pDrawInfo);
  3786. PROCEDURE FreeSysRequest(window : pWindow);
  3787. PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : POINTER);
  3788. FUNCTION GetAttr(attrID : ULONG; obj : POINTER; storagePtr : POINTER) : ULONG;
  3789. PROCEDURE GetDefaultPubScreen(nameBuffer : pCHAR);
  3790. FUNCTION GetDefPrefs(preferences : pPreferences; size : LONGINT) : pPreferences;
  3791. FUNCTION GetPrefs(preferences : pPreferences; size : LONGINT) : pPreferences;
  3792. FUNCTION GetScreenData(buffer : POINTER; size : ULONG; type_ : ULONG; screen : pScreen) : BOOLEAN;
  3793. FUNCTION GetScreenDrawInfo(screen : pScreen) : pDrawInfo;
  3794. PROCEDURE HelpControl(win : pWindow; flags : ULONG);
  3795. PROCEDURE InitRequester(requester : pRequester);
  3796. FUNCTION IntuiTextLength(iText : pIntuiText) : LONGINT;
  3797. FUNCTION ItemAddress(menuStrip : pMenu; menuNumber : ULONG) : pMenuItem;
  3798. PROCEDURE LendMenus(fromwindow : pWindow; towindow : pWindow);
  3799. FUNCTION LockIBase(dontknow : ULONG) : ULONG;
  3800. FUNCTION LockPubScreen(name : pCHAR) : pScreen;
  3801. FUNCTION LockPubScreenList : pList;
  3802. FUNCTION MakeClass(classID : pCHAR; superClassID : pCHAR; superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
  3803. FUNCTION MakeScreen(screen : pScreen) : LONGINT;
  3804. FUNCTION ModifyIDCMP(window : pWindow; flags : ULONG) : BOOLEAN;
  3805. PROCEDURE ModifyProp(gadget : pGadget; window : pWindow; requester : pRequester; flags : ULONG; horizPot : ULONG; vertPot : ULONG; horizBody : ULONG; vertBody : ULONG);
  3806. PROCEDURE MoveScreen(screen : pScreen; dx : LONGINT; dy : LONGINT);
  3807. PROCEDURE MoveWindow(window : pWindow; dx : LONGINT; dy : LONGINT);
  3808. PROCEDURE MoveWindowInFrontOf(window : pWindow; behindWindow : pWindow);
  3809. PROCEDURE NewModifyProp(gadget : pGadget; window : pWindow; requester : pRequester; flags : ULONG; horizPot : ULONG; vertPot : ULONG; horizBody : ULONG; vertBody : ULONG; numGad : LONGINT);
  3810. FUNCTION NewObjectA(classPtr : pIClass; classID : pCHAR; tagList : pTagItem) : POINTER;
  3811. FUNCTION NextObject(objectPtrPtr : POINTER) : POINTER;
  3812. FUNCTION NextPubScreen(screen : pScreen; namebuf : pCHAR) : pCHAR;
  3813. FUNCTION ObtainGIRPort(gInfo : pGadgetInfo) : pRastPort;
  3814. PROCEDURE OffGadget(gadget : pGadget; window : pWindow; requester : pRequester);
  3815. PROCEDURE OffMenu(window : pWindow; menuNumber : ULONG);
  3816. PROCEDURE OnGadget(gadget : pGadget; window : pWindow; requester : pRequester);
  3817. PROCEDURE OnMenu(window : pWindow; menuNumber : ULONG);
  3818. FUNCTION OpenScreen(newScreen : pNewScreen) : pScreen;
  3819. FUNCTION OpenScreenTagList(newScreen : pNewScreen; tagList : pTagItem) : pScreen;
  3820. FUNCTION OpenWindow(newWindow : pNewWindow) : pWindow;
  3821. FUNCTION OpenWindowTagList(newWindow : pNewWindow; tagList : pTagItem) : pWindow;
  3822. FUNCTION OpenWorkBench : ULONG;
  3823. FUNCTION PointInImage(point : ULONG; image : pImage) : BOOLEAN;
  3824. PROCEDURE PrintIText(rp : pRastPort; iText : pIntuiText; left : LONGINT; top : LONGINT);
  3825. FUNCTION PubScreenStatus(screen : pScreen; statusFlags : ULONG) : WORD;
  3826. FUNCTION QueryOverscan(displayID : ULONG; rect : pRectangle; oScanType : LONGINT) : LONGINT;
  3827. PROCEDURE RefreshGadgets(gadgets : pGadget; window : pWindow; requester : pRequester);
  3828. PROCEDURE RefreshGList(gadgets : pGadget; window : pWindow; requester : pRequester; numGad : LONGINT);
  3829. PROCEDURE RefreshWindowFrame(window : pWindow);
  3830. PROCEDURE ReleaseGIRPort(rp : pRastPort);
  3831. FUNCTION RemakeDisplay : LONGINT;
  3832. PROCEDURE RemoveClass(classPtr : pIClass);
  3833. FUNCTION RemoveGadget(window : pWindow; gadget : pGadget) : WORD;
  3834. FUNCTION RemoveGList(remPtr : pWindow; gadget : pGadget; numGad : LONGINT) : WORD;
  3835. PROCEDURE ReportMouse(flag : LONGINT; window : pWindow);
  3836. FUNCTION Request(requester : pRequester; window : pWindow) : BOOLEAN;
  3837. FUNCTION ResetMenuStrip(window : pWindow; menu : pMenu) : BOOLEAN;
  3838. FUNCTION RethinkDisplay : LONGINT;
  3839. PROCEDURE ScreenDepth(screen : pScreen; flags : ULONG; reserved : POINTER);
  3840. PROCEDURE ScreenPosition(screen : pScreen; flags : ULONG; x1 : LONGINT; y1 : LONGINT; x2 : LONGINT; y2 : LONGINT);
  3841. PROCEDURE ScreenToBack(screen : pScreen);
  3842. PROCEDURE ScreenToFront(screen : pScreen);
  3843. PROCEDURE ScrollWindowRaster(win : pWindow; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  3844. FUNCTION SetAttrsA(obj : POINTER; tagList : pTagItem) : ULONG;
  3845. PROCEDURE SetDefaultPubScreen(name : pCHAR);
  3846. FUNCTION SetDMRequest(window : pWindow; requester : pRequester) : BOOLEAN;
  3847. FUNCTION SetEditHook(hook : pHook) : pHook;
  3848. FUNCTION SetGadgetAttrsA(gadget : pGadget; window : pWindow; requester : pRequester; tagList : pTagItem) : ULONG;
  3849. FUNCTION SetMenuStrip(window : pWindow; menu : pMenu) : BOOLEAN;
  3850. FUNCTION SetMouseQueue(window : pWindow; queueLength : ULONG) : LONGINT;
  3851. PROCEDURE SetPointer(window : pWindow; pointer_ : POINTER; height : LONGINT; width : LONGINT; xOffset : LONGINT; yOffset : LONGINT);
  3852. FUNCTION SetPrefs(preferences : pPreferences; size : LONGINT; inform : LONGINT) : pPreferences;
  3853. FUNCTION SetPubScreenModes(modes : ULONG) : WORD;
  3854. PROCEDURE SetWindowPointerA(win : pWindow; taglist : pTagItem);
  3855. PROCEDURE SetWindowTitles(window : pWindow; windowTitle : pCHAR; screenTitle : pCHAR);
  3856. PROCEDURE ShowTitle(screen : pScreen; showIt : LONGINT);
  3857. PROCEDURE SizeWindow(window : pWindow; dx : LONGINT; dy : LONGINT);
  3858. FUNCTION SysReqHandler(window : pWindow; idcmpPtr : ULONG; waitInput : LONGINT) : LONGINT;
  3859. FUNCTION TimedDisplayAlert(alertNumber : ULONG; string_ : pCHAR; height : ULONG; time : ULONG) : BOOLEAN;
  3860. PROCEDURE UnlockIBase(ibLock : ULONG);
  3861. PROCEDURE UnlockPubScreen(name : pCHAR; screen : pScreen);
  3862. PROCEDURE UnlockPubScreenList;
  3863. FUNCTION ViewAddress : pView;
  3864. FUNCTION ViewPortAddress(window : pWindow) : pViewPort;
  3865. FUNCTION WBenchToBack : BOOLEAN;
  3866. FUNCTION WBenchToFront : BOOLEAN;
  3867. FUNCTION WindowLimits(window : pWindow; widthMin : LONGINT; heightMin : LONGINT; widthMax : ULONG; heightMax : ULONG) : BOOLEAN;
  3868. PROCEDURE WindowToBack(window : pWindow);
  3869. PROCEDURE WindowToFront(window : pWindow);
  3870. PROCEDURE ZipWindow(window : pWindow);
  3871.  
  3872. { Intuition macros }
  3873. function INST_DATA (cl: pIClass; o: p_Object): Pointer;
  3874. function SIZEOF_INSTANCE (cl: pIClass): Longint;
  3875. function BASEOBJECT (o: p_Object): Pointer;
  3876. function _OBJ(o: p_Object): p_Object;
  3877. function __OBJECT (o: Pointer): p_Object;
  3878. function OCLASS (o: Pointer): pIClass;
  3879. function SHIFTITEM (n: integer): word;
  3880. function SHIFTMENU (n: integer): word;
  3881. function SHIFTSUB (n: integer): word;
  3882. function FULLMENUNUM (menu, item, sub: integer): word;
  3883. function IM_BGPEN (im: pImage): byte;
  3884. function IM_BOX (im: pImage): pIBox;
  3885. function IM_FGPEN (im: pImage): byte;
  3886. function GADGET_BOX (g: pGadget): pIBox;
  3887. function CUSTOM_HOOK (gadget: pGadget): pHook;
  3888. function ITEMNUM( n : Word): Word;
  3889. function MENUNUM( n : Word): Word;
  3890. function SUBNUM( n : Word): Word;
  3891.  
  3892. IMPLEMENTATION
  3893.  
  3894. function INST_DATA (cl: pIClass; o: p_Object): Pointer;
  3895. begin
  3896.     INST_DATA := Pointer(Longint(o) + cl^.cl_InstOffset);
  3897. end;
  3898.  
  3899. function SIZEOF_INSTANCE (cl: pIClass): Longint;
  3900. begin
  3901.     SIZEOF_INSTANCE := cl^.cl_InstOffset + cl^.cl_InstSize + sizeof(t_Object);
  3902. end;
  3903.  
  3904. function BASEOBJECT (o: p_Object): Pointer;
  3905. begin
  3906.     BASEOBJECT := Pointer(Longint(o) + sizeof(t_Object));
  3907. end;
  3908.  
  3909. function _OBJ(o: p_Object): p_Object;
  3910. begin
  3911.      _OBJ := p_Object(o);
  3912. END;
  3913.  
  3914. function __OBJECT (o: Pointer): p_Object;
  3915. begin
  3916.     __OBJECT := p_Object(Longint(o) - sizeof(t_Object))
  3917. end;
  3918.  
  3919. function OCLASS (o: Pointer): pIClass;
  3920. var
  3921.     obj: p_Object;
  3922. begin
  3923.     obj := p_Object(Longint(o) - sizeof(t_Object));
  3924.     OCLASS := obj^.o_Class;
  3925. end;
  3926.  
  3927. function SHIFTITEM (n: integer): word;
  3928. begin
  3929.     SHIFTITEM := (n and $3f) shl 5
  3930. end;
  3931.  
  3932. function SHIFTMENU (n: integer): word;
  3933. begin
  3934.     SHIFTMENU := n and $1f
  3935. end;
  3936.  
  3937. function SHIFTSUB (n: integer): word;
  3938. begin
  3939.     SHIFTSUB := (n and $1f) shl 11
  3940. end;
  3941.  
  3942. function FULLMENUNUM (menu, item, sub: integer): word;
  3943. begin
  3944.     FULLMENUNUM := ((sub and $1f) shl 11) or
  3945.                     ((item and $3f) shl 5) or
  3946.                       (menu and $1f)
  3947. end;
  3948.  
  3949.  
  3950.  
  3951. { The next functons _BGPEN AND _FGPEN aren't a full replacement of the
  3952.   C macros because the C preprocessor makes it possible to set the
  3953.   A/BPen values of the image class objects as well. This can't work
  3954.   in pascal, of course! }
  3955.  
  3956. function IM_BGPEN (im: pImage): byte;
  3957. begin
  3958.     IM_BGPEN := im^.PlaneOnOff;
  3959. end;
  3960.  
  3961. function IM_BOX (im: pImage): pIBox;
  3962. begin
  3963.     IM_BOX := pIBox(@im^.LeftEdge);
  3964. END;
  3965.  
  3966. function IM_FGPEN (im: pImage): byte;
  3967. begin
  3968.     IM_FGPEN := im^.PlanePick;
  3969. end;
  3970.  
  3971. function GADGET_BOX (g: pGadget): pIBox;
  3972. begin
  3973.     GADGET_BOX := pIBox(@g^.LeftEdge);
  3974. end;
  3975.  
  3976. function CUSTOM_HOOK (gadget: pGadget): pHook;
  3977. begin
  3978.     CUSTOM_HOOK := pHook(gadget^.MutualExclude);
  3979. end;
  3980.  
  3981. function ITEMNUM( n : Word): Word;
  3982. begin
  3983.     ITEMNUM := (n shr 5) and $3F
  3984. end;
  3985.  
  3986. function MENUNUM( n : Word): Word;
  3987. begin
  3988.     MENUNUM := n and $1f
  3989. end;
  3990.  
  3991. function SUBNUM( n : Word): Word;
  3992. begin
  3993.     SUBNUM := (n shr 11) and $1f
  3994. end;
  3995.  
  3996. FUNCTION ActivateGadget(gadgets : pGadget; window : pWindow; requester : pRequester) : BOOLEAN;
  3997. BEGIN
  3998.   ASM
  3999.     MOVE.L  A6,-(A7)
  4000.     MOVEA.L gadgets,A0
  4001.     MOVEA.L window,A1
  4002.     MOVEA.L requester,A2
  4003.     MOVEA.L _IntuitionBase,A6
  4004.     JSR -462(A6)
  4005.     MOVEA.L (A7)+,A6
  4006.     TST.W   D0
  4007.     BEQ.B   @end
  4008.     MOVEQ   #1,D0
  4009.   @end: MOVE.B  D0,@RESULT
  4010.   END;
  4011. END;
  4012.  
  4013. PROCEDURE ActivateWindow(window : pWindow);
  4014. BEGIN
  4015.   ASM
  4016.     MOVE.L  A6,-(A7)
  4017.     MOVEA.L window,A0
  4018.     MOVEA.L _IntuitionBase,A6
  4019.     JSR -450(A6)
  4020.     MOVEA.L (A7)+,A6
  4021.   END;
  4022. END;
  4023.  
  4024. PROCEDURE AddClass(classPtr : pIClass);
  4025. BEGIN
  4026.   ASM
  4027.     MOVE.L  A6,-(A7)
  4028.     MOVEA.L classPtr,A0
  4029.     MOVEA.L _IntuitionBase,A6
  4030.     JSR -684(A6)
  4031.     MOVEA.L (A7)+,A6
  4032.   END;
  4033. END;
  4034.  
  4035. FUNCTION AddGadget(window : pWindow; gadget : pGadget; position : ULONG) : WORD;
  4036. BEGIN
  4037.   ASM
  4038.     MOVE.L  A6,-(A7)
  4039.     MOVEA.L window,A0
  4040.     MOVEA.L gadget,A1
  4041.     MOVE.L  position,D0
  4042.     MOVEA.L _IntuitionBase,A6
  4043.     JSR -042(A6)
  4044.     MOVEA.L (A7)+,A6
  4045.     MOVE.L  D0,@RESULT
  4046.   END;
  4047. END;
  4048.  
  4049. FUNCTION AddGList(window : pWindow; gadget : pGadget; position : ULONG; numGad : LONGINT; requester : pRequester) : WORD;
  4050. BEGIN
  4051.   ASM
  4052.     MOVE.L  A6,-(A7)
  4053.     MOVEA.L window,A0
  4054.     MOVEA.L gadget,A1
  4055.     MOVE.L  position,D0
  4056.     MOVE.L  numGad,D1
  4057.     MOVEA.L requester,A2
  4058.     MOVEA.L _IntuitionBase,A6
  4059.     JSR -438(A6)
  4060.     MOVEA.L (A7)+,A6
  4061.     MOVE.L  D0,@RESULT
  4062.   END;
  4063. END;
  4064.  
  4065. FUNCTION AllocRemember(VAR rememberKey : pRemember; size : ULONG; flags : ULONG) : POINTER;
  4066. BEGIN
  4067.   ASM
  4068.     MOVE.L  A6,-(A7)
  4069.     MOVEA.L rememberKey,A0
  4070.     MOVE.L  size,D0
  4071.     MOVE.L  flags,D1
  4072.     MOVEA.L _IntuitionBase,A6
  4073.     JSR -396(A6)
  4074.     MOVEA.L (A7)+,A6
  4075.     MOVE.L  D0,@RESULT
  4076.   END;
  4077. END;
  4078.  
  4079. FUNCTION AllocScreenBuffer(sc : pScreen; bm : pBitMap; flags : ULONG) : pScreenBuffer;
  4080. BEGIN
  4081.   ASM
  4082.     MOVE.L  A6,-(A7)
  4083.     MOVEA.L sc,A0
  4084.     MOVEA.L bm,A1
  4085.     MOVE.L  flags,D0
  4086.     MOVEA.L _IntuitionBase,A6
  4087.     JSR -768(A6)
  4088.     MOVEA.L (A7)+,A6
  4089.     MOVE.L  D0,@RESULT
  4090.   END;
  4091. END;
  4092.  
  4093. FUNCTION AutoRequest(window : pWindow; body : pIntuiText; posText : pIntuiText; negText : pIntuiText; pFlag : ULONG; nFlag : ULONG; width : ULONG; height : ULONG) : BOOLEAN;
  4094. BEGIN
  4095.   ASM
  4096.     MOVE.L  A6,-(A7)
  4097.     MOVEA.L window,A0
  4098.     MOVEA.L body,A1
  4099.     MOVEA.L posText,A2
  4100.     MOVEA.L negText,A3
  4101.     MOVE.L  pFlag,D0
  4102.     MOVE.L  nFlag,D1
  4103.     MOVE.L  width,D2
  4104.     MOVE.L  height,D3
  4105.     MOVEA.L _IntuitionBase,A6
  4106.     JSR -348(A6)
  4107.     MOVEA.L (A7)+,A6
  4108.     TST.W   D0
  4109.     BEQ.B   @end
  4110.     MOVEQ   #1,D0
  4111.   @end: MOVE.B  D0,@RESULT
  4112.   END;
  4113. END;
  4114.  
  4115. PROCEDURE BeginRefresh(window : pWindow);
  4116. BEGIN
  4117.   ASM
  4118.     MOVE.L  A6,-(A7)
  4119.     MOVEA.L window,A0
  4120.     MOVEA.L _IntuitionBase,A6
  4121.     JSR -354(A6)
  4122.     MOVEA.L (A7)+,A6
  4123.   END;
  4124. END;
  4125.  
  4126. FUNCTION BuildEasyRequestArgs(window : pWindow; easyStruct : pEasyStruct; idcmp : ULONG; args : POINTER) : pWindow;
  4127. BEGIN
  4128.   ASM
  4129.     MOVE.L  A6,-(A7)
  4130.     MOVEA.L window,A0
  4131.     MOVEA.L easyStruct,A1
  4132.     MOVE.L  idcmp,D0
  4133.     MOVEA.L args,A3
  4134.     MOVEA.L _IntuitionBase,A6
  4135.     JSR -594(A6)
  4136.     MOVEA.L (A7)+,A6
  4137.     MOVE.L  D0,@RESULT
  4138.   END;
  4139. END;
  4140.  
  4141. FUNCTION BuildSysRequest(window : pWindow; body : pIntuiText; posText : pIntuiText; negText : pIntuiText; flags : ULONG; width : ULONG; height : ULONG) : pWindow;
  4142. BEGIN
  4143.   ASM
  4144.     MOVE.L  A6,-(A7)
  4145.     MOVEA.L window,A0
  4146.     MOVEA.L body,A1
  4147.     MOVEA.L posText,A2
  4148.     MOVEA.L negText,A3
  4149.     MOVE.L  flags,D0
  4150.     MOVE.L  width,D1
  4151.     MOVE.L  height,D2
  4152.     MOVEA.L _IntuitionBase,A6
  4153.     JSR -360(A6)
  4154.     MOVEA.L (A7)+,A6
  4155.     MOVE.L  D0,@RESULT
  4156.   END;
  4157. END;
  4158.  
  4159. FUNCTION ChangeScreenBuffer(sc : pScreen; sb : pScreenBuffer) : ULONG;
  4160. BEGIN
  4161.   ASM
  4162.     MOVE.L  A6,-(A7)
  4163.     MOVEA.L sc,A0
  4164.     MOVEA.L sb,A1
  4165.     MOVEA.L _IntuitionBase,A6
  4166.     JSR -780(A6)
  4167.     MOVEA.L (A7)+,A6
  4168.     MOVE.L  D0,@RESULT
  4169.   END;
  4170. END;
  4171.  
  4172. PROCEDURE ChangeWindowBox(window : pWindow; left : LONGINT; top : LONGINT; width : LONGINT; height : LONGINT);
  4173. BEGIN
  4174.   ASM
  4175.     MOVE.L  A6,-(A7)
  4176.     MOVEA.L window,A0
  4177.     MOVE.L  left,D0
  4178.     MOVE.L  top,D1
  4179.     MOVE.L  width,D2
  4180.     MOVE.L  height,D3
  4181.     MOVEA.L _IntuitionBase,A6
  4182.     JSR -486(A6)
  4183.     MOVEA.L (A7)+,A6
  4184.   END;
  4185. END;
  4186.  
  4187. FUNCTION ClearDMRequest(window : pWindow) : BOOLEAN;
  4188. BEGIN
  4189.   ASM
  4190.     MOVE.L  A6,-(A7)
  4191.     MOVEA.L window,A0
  4192.     MOVEA.L _IntuitionBase,A6
  4193.     JSR -048(A6)
  4194.     MOVEA.L (A7)+,A6
  4195.     TST.W   D0
  4196.     BEQ.B   @end
  4197.     MOVEQ   #1,D0
  4198.   @end: MOVE.B  D0,@RESULT
  4199.   END;
  4200. END;
  4201.  
  4202. PROCEDURE ClearMenuStrip(window : pWindow);
  4203. BEGIN
  4204.   ASM
  4205.     MOVE.L  A6,-(A7)
  4206.     MOVEA.L window,A0
  4207.     MOVEA.L _IntuitionBase,A6
  4208.     JSR -054(A6)
  4209.     MOVEA.L (A7)+,A6
  4210.   END;
  4211. END;
  4212.  
  4213. PROCEDURE ClearPointer(window : pWindow);
  4214. BEGIN
  4215.   ASM
  4216.     MOVE.L  A6,-(A7)
  4217.     MOVEA.L window,A0
  4218.     MOVEA.L _IntuitionBase,A6
  4219.     JSR -060(A6)
  4220.     MOVEA.L (A7)+,A6
  4221.   END;
  4222. END;
  4223.  
  4224. PROCEDURE CloseScreen(screen : pScreen);
  4225. BEGIN
  4226.   ASM
  4227.     MOVE.L  A6,-(A7)
  4228.     MOVEA.L screen,A0
  4229.     MOVEA.L _IntuitionBase,A6
  4230.     JSR -066(A6)
  4231.     MOVEA.L (A7)+,A6
  4232.   END;
  4233. END;
  4234.  
  4235. PROCEDURE CloseWindow(window : pWindow);
  4236. BEGIN
  4237.   ASM
  4238.     MOVE.L  A6,-(A7)
  4239.     MOVEA.L window,A0
  4240.     MOVEA.L _IntuitionBase,A6
  4241.     JSR -072(A6)
  4242.     MOVEA.L (A7)+,A6
  4243.   END;
  4244. END;
  4245.  
  4246. FUNCTION CloseWorkBench : BOOLEAN;
  4247. BEGIN
  4248.   ASM
  4249.     MOVE.L  A6,-(A7)
  4250.     MOVEA.L _IntuitionBase,A6
  4251.     JSR -078(A6)
  4252.     MOVEA.L (A7)+,A6
  4253.     TST.L   D0
  4254.     BEQ.B   @end
  4255.     MOVEQ   #1,D0
  4256.     @end: MOVE.B  D0,@RESULT
  4257.   END;
  4258. END;
  4259.  
  4260. PROCEDURE CurrentTime(VAR seconds : ULONG; VAR micros : ULONG);
  4261. BEGIN
  4262.   ASM
  4263.     MOVE.L  A6,-(A7)
  4264.     MOVEA.L seconds,A0
  4265.     MOVEA.L micros,A1
  4266.     MOVEA.L _IntuitionBase,A6
  4267.     JSR -084(A6)
  4268.     MOVEA.L (A7)+,A6
  4269.   END;
  4270. END;
  4271.  
  4272. FUNCTION DisplayAlert(alertNumber : ULONG; string_ : pCHAR; height : ULONG) : BOOLEAN;
  4273. BEGIN
  4274.   ASM
  4275.     MOVE.L  A6,-(A7)
  4276.     MOVE.L  alertNumber,D0
  4277.     MOVEA.L string_,A0
  4278.     MOVE.L  height,D1
  4279.     MOVEA.L _IntuitionBase,A6
  4280.     JSR -090(A6)
  4281.     MOVEA.L (A7)+,A6
  4282.     TST.W   D0
  4283.     BEQ.B   @end
  4284.     MOVEQ   #1,D0
  4285.   @end: MOVE.B  D0,@RESULT
  4286.   END;
  4287. END;
  4288.  
  4289. PROCEDURE DisplayBeep(screen : pScreen);
  4290. BEGIN
  4291.   ASM
  4292.     MOVE.L  A6,-(A7)
  4293.     MOVEA.L screen,A0
  4294.     MOVEA.L _IntuitionBase,A6
  4295.     JSR -096(A6)
  4296.     MOVEA.L (A7)+,A6
  4297.   END;
  4298. END;
  4299.  
  4300. PROCEDURE DisposeObject(obj : POINTER);
  4301. BEGIN
  4302.   ASM
  4303.     MOVE.L  A6,-(A7)
  4304.     MOVEA.L obj,A0
  4305.     MOVEA.L _IntuitionBase,A6
  4306.     JSR -642(A6)
  4307.     MOVEA.L (A7)+,A6
  4308.   END;
  4309. END;
  4310.  
  4311. FUNCTION DoGadgetMethodA(gad : pGadget; win : pWindow; req : pRequester; message : tMsg) : ULONG;
  4312. BEGIN
  4313.   ASM
  4314.     MOVE.L  A6,-(A7)
  4315.     MOVEA.L gad,A0
  4316.     MOVEA.L win,A1
  4317.     MOVEA.L req,A2
  4318.     MOVEA.L message,A3
  4319.     MOVEA.L _IntuitionBase,A6
  4320.     JSR -810(A6)
  4321.     MOVEA.L (A7)+,A6
  4322.     MOVE.L  D0,@RESULT
  4323.   END;
  4324. END;
  4325.  
  4326. FUNCTION DoubleClick(sSeconds : ULONG; sMicros : ULONG; cSeconds : ULONG; cMicros : ULONG) : BOOLEAN;
  4327. BEGIN
  4328.   ASM
  4329.     MOVE.L  A6,-(A7)
  4330.     MOVE.L  sSeconds,D0
  4331.     MOVE.L  sMicros,D1
  4332.     MOVE.L  cSeconds,D2
  4333.     MOVE.L  cMicros,D3
  4334.     MOVEA.L _IntuitionBase,A6
  4335.     JSR -102(A6)
  4336.     MOVEA.L (A7)+,A6
  4337.     TST.W   D0
  4338.     BEQ.B   @end
  4339.     MOVEQ   #1,D0
  4340.   @end: MOVE.B  D0,@RESULT
  4341.   END;
  4342. END;
  4343.  
  4344. PROCEDURE DrawBorder(rp : pRastPort; border : pBorder; leftOffset : LONGINT; topOffset : LONGINT);
  4345. BEGIN
  4346.   ASM
  4347.     MOVE.L  A6,-(A7)
  4348.     MOVEA.L rp,A0
  4349.     MOVEA.L border,A1
  4350.     MOVE.L  leftOffset,D0
  4351.     MOVE.L  topOffset,D1
  4352.     MOVEA.L _IntuitionBase,A6
  4353.     JSR -108(A6)
  4354.     MOVEA.L (A7)+,A6
  4355.   END;
  4356. END;
  4357.  
  4358. PROCEDURE DrawImage(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT);
  4359. BEGIN
  4360.   ASM
  4361.     MOVE.L  A6,-(A7)
  4362.     MOVEA.L rp,A0
  4363.     MOVEA.L image,A1
  4364.     MOVE.L  leftOffset,D0
  4365.     MOVE.L  topOffset,D1
  4366.     MOVEA.L _IntuitionBase,A6
  4367.     JSR -114(A6)
  4368.     MOVEA.L (A7)+,A6
  4369.   END;
  4370. END;
  4371.  
  4372. PROCEDURE DrawImageState(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT; state : ULONG; drawInfo : pDrawInfo);
  4373. BEGIN
  4374.   ASM
  4375.     MOVE.L  A6,-(A7)
  4376.     MOVEA.L rp,A0
  4377.     MOVEA.L image,A1
  4378.     MOVE.L  leftOffset,D0
  4379.     MOVE.L  topOffset,D1
  4380.     MOVE.L  state,D2
  4381.     MOVEA.L drawInfo,A2
  4382.     MOVEA.L _IntuitionBase,A6
  4383.     JSR -618(A6)
  4384.     MOVEA.L (A7)+,A6
  4385.   END;
  4386. END;
  4387.  
  4388. FUNCTION EasyRequestArgs(window : pWindow; easyStruct : pEasyStruct; idcmpPtr : ULONG; args : POINTER) : LONGINT;
  4389. BEGIN
  4390.   ASM
  4391.     MOVE.L  A6,-(A7)
  4392.     MOVEA.L window,A0
  4393.     MOVEA.L easyStruct,A1
  4394.     MOVEA.L idcmpPtr,A2
  4395.     MOVEA.L args,A3
  4396.     MOVEA.L _IntuitionBase,A6
  4397.     JSR -588(A6)
  4398.     MOVEA.L (A7)+,A6
  4399.     MOVE.L  D0,@RESULT
  4400.   END;
  4401. END;
  4402.  
  4403. PROCEDURE EndRefresh(window : pWindow; complete : LONGINT);
  4404. BEGIN
  4405.   ASM
  4406.     MOVE.L  A6,-(A7)
  4407.     MOVEA.L window,A0
  4408.     MOVE.L  complete,D0
  4409.     MOVEA.L _IntuitionBase,A6
  4410.     JSR -366(A6)
  4411.     MOVEA.L (A7)+,A6
  4412.   END;
  4413. END;
  4414.  
  4415. PROCEDURE EndRequest(requester : pRequester; window : pWindow);
  4416. BEGIN
  4417.   ASM
  4418.     MOVE.L  A6,-(A7)
  4419.     MOVEA.L requester,A0
  4420.     MOVEA.L window,A1
  4421.     MOVEA.L _IntuitionBase,A6
  4422.     JSR -120(A6)
  4423.     MOVEA.L (A7)+,A6
  4424.   END;
  4425. END;
  4426.  
  4427. PROCEDURE EraseImage(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT);
  4428. BEGIN
  4429.   ASM
  4430.     MOVE.L  A6,-(A7)
  4431.     MOVEA.L rp,A0
  4432.     MOVEA.L image,A1
  4433.     MOVE.L  leftOffset,D0
  4434.     MOVE.L  topOffset,D1
  4435.     MOVEA.L _IntuitionBase,A6
  4436.     JSR -630(A6)
  4437.     MOVEA.L (A7)+,A6
  4438.   END;
  4439. END;
  4440.  
  4441. FUNCTION FreeClass(classPtr : pIClass) : BOOLEAN;
  4442. BEGIN
  4443.   ASM
  4444.     MOVE.L  A6,-(A7)
  4445.     MOVEA.L classPtr,A0
  4446.     MOVEA.L _IntuitionBase,A6
  4447.     JSR -714(A6)
  4448.     MOVEA.L (A7)+,A6
  4449.     TST.W   D0
  4450.     BEQ.B   @end
  4451.     MOVEQ   #1,D0
  4452.   @end: MOVE.B  D0,@RESULT
  4453.   END;
  4454. END;
  4455.  
  4456. PROCEDURE FreeRemember(VAR rememberKey : pRemember; reallyForget : LONGINT);
  4457. BEGIN
  4458.   ASM
  4459.     MOVE.L  A6,-(A7)
  4460.     MOVEA.L rememberKey,A0
  4461.     MOVE.L  reallyForget,D0
  4462.     MOVEA.L _IntuitionBase,A6
  4463.     JSR -408(A6)
  4464.     MOVEA.L (A7)+,A6
  4465.   END;
  4466. END;
  4467.  
  4468. PROCEDURE FreeScreenBuffer(sc : pScreen; sb : pScreenBuffer);
  4469. BEGIN
  4470.   ASM
  4471.     MOVE.L  A6,-(A7)
  4472.     MOVEA.L sc,A0
  4473.     MOVEA.L sb,A1
  4474.     MOVEA.L _IntuitionBase,A6
  4475.     JSR -774(A6)
  4476.     MOVEA.L (A7)+,A6
  4477.   END;
  4478. END;
  4479.  
  4480. PROCEDURE FreeScreenDrawInfo(screen : pScreen; drawInfo : pDrawInfo);
  4481. BEGIN
  4482.   ASM
  4483.     MOVE.L  A6,-(A7)
  4484.     MOVEA.L screen,A0
  4485.     MOVEA.L drawInfo,A1
  4486.     MOVEA.L _IntuitionBase,A6
  4487.     JSR -696(A6)
  4488.     MOVEA.L (A7)+,A6
  4489.   END;
  4490. END;
  4491.  
  4492. PROCEDURE FreeSysRequest(window : pWindow);
  4493. BEGIN
  4494.   ASM
  4495.     MOVE.L  A6,-(A7)
  4496.     MOVEA.L window,A0
  4497.     MOVEA.L _IntuitionBase,A6
  4498.     JSR -372(A6)
  4499.     MOVEA.L (A7)+,A6
  4500.   END;
  4501. END;
  4502.  
  4503. PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : POINTER);
  4504. BEGIN
  4505.   ASM
  4506.     MOVE.L  A6,-(A7)
  4507.     MOVEA.L gadget,A0
  4508.     MOVEA.L gInfo,A1
  4509.     MOVEA.L mousePoint,A2
  4510.     MOVEA.L _IntuitionBase,A6
  4511.     JSR -570(A6)
  4512.     MOVEA.L (A7)+,A6
  4513.   END;
  4514. END;
  4515.  
  4516. FUNCTION GetAttr(attrID : ULONG; obj : POINTER; storagePtr : POINTER) : ULONG;
  4517. BEGIN
  4518.   ASM
  4519.     MOVE.L  A6,-(A7)
  4520.     MOVE.L  attrID,D0
  4521.     MOVEA.L obj,A0
  4522.     MOVEA.L storagePtr,A1
  4523.     MOVEA.L _IntuitionBase,A6
  4524.     JSR -654(A6)
  4525.     MOVEA.L (A7)+,A6
  4526.     MOVE.L  D0,@RESULT
  4527.   END;
  4528. END;
  4529.  
  4530. PROCEDURE GetDefaultPubScreen(nameBuffer : pCHAR);
  4531. BEGIN
  4532.   ASM
  4533.     MOVE.L  A6,-(A7)
  4534.     MOVEA.L nameBuffer,A0
  4535.     MOVEA.L _IntuitionBase,A6
  4536.     JSR -582(A6)
  4537.     MOVEA.L (A7)+,A6
  4538.   END;
  4539. END;
  4540.  
  4541. FUNCTION GetDefPrefs(preferences : pPreferences; size : LONGINT) : pPreferences;
  4542. BEGIN
  4543.   ASM
  4544.     MOVE.L  A6,-(A7)
  4545.     MOVEA.L preferences,A0
  4546.     MOVE.L  size,D0
  4547.     MOVEA.L _IntuitionBase,A6
  4548.     JSR -126(A6)
  4549.     MOVEA.L (A7)+,A6
  4550.     MOVE.L  D0,@RESULT
  4551.   END;
  4552. END;
  4553.  
  4554. FUNCTION GetPrefs(preferences : pPreferences; size : LONGINT) : pPreferences;
  4555. BEGIN
  4556.   ASM
  4557.     MOVE.L  A6,-(A7)
  4558.     MOVEA.L preferences,A0
  4559.     MOVE.L  size,D0
  4560.     MOVEA.L _IntuitionBase,A6
  4561.     JSR -132(A6)
  4562.     MOVEA.L (A7)+,A6
  4563.     MOVE.L  D0,@RESULT
  4564.   END;
  4565. END;
  4566.  
  4567. FUNCTION GetScreenData(buffer : POINTER; size : ULONG; type_ : ULONG; screen : pScreen) : BOOLEAN;
  4568. BEGIN
  4569.   ASM
  4570.     MOVE.L  A6,-(A7)
  4571.     MOVEA.L buffer,A0
  4572.     MOVE.L  size,D0
  4573.     MOVE.L  type_,D1
  4574.     MOVEA.L screen,A1
  4575.     MOVEA.L _IntuitionBase,A6
  4576.     JSR -426(A6)
  4577.     MOVEA.L (A7)+,A6
  4578.     TST.L   D0
  4579.     BEQ.B   @end
  4580.     MOVEQ   #1,D0
  4581.     @end: MOVE.B  D0,@RESULT
  4582.   END;
  4583. END;
  4584.  
  4585. FUNCTION GetScreenDrawInfo(screen : pScreen) : pDrawInfo;
  4586. BEGIN
  4587.   ASM
  4588.     MOVE.L  A6,-(A7)
  4589.     MOVEA.L screen,A0
  4590.     MOVEA.L _IntuitionBase,A6
  4591.     JSR -690(A6)
  4592.     MOVEA.L (A7)+,A6
  4593.     MOVE.L  D0,@RESULT
  4594.   END;
  4595. END;
  4596.  
  4597. PROCEDURE HelpControl(win : pWindow; flags : ULONG);
  4598. BEGIN
  4599.   ASM
  4600.     MOVE.L  A6,-(A7)
  4601.     MOVEA.L win,A0
  4602.     MOVE.L  flags,D0
  4603.     MOVEA.L _IntuitionBase,A6
  4604.     JSR -828(A6)
  4605.     MOVEA.L (A7)+,A6
  4606.   END;
  4607. END;
  4608.  
  4609. PROCEDURE InitRequester(requester : pRequester);
  4610. BEGIN
  4611.   ASM
  4612.     MOVE.L  A6,-(A7)
  4613.     MOVEA.L requester,A0
  4614.     MOVEA.L _IntuitionBase,A6
  4615.     JSR -138(A6)
  4616.     MOVEA.L (A7)+,A6
  4617.   END;
  4618. END;
  4619.  
  4620. FUNCTION IntuiTextLength(iText : pIntuiText) : LONGINT;
  4621. BEGIN
  4622.   ASM
  4623.     MOVE.L  A6,-(A7)
  4624.     MOVEA.L iText,A0
  4625.     MOVEA.L _IntuitionBase,A6
  4626.     JSR -330(A6)
  4627.     MOVEA.L (A7)+,A6
  4628.     MOVE.L  D0,@RESULT
  4629.   END;
  4630. END;
  4631.  
  4632. FUNCTION ItemAddress(menuStrip : pMenu; menuNumber : ULONG) : pMenuItem;
  4633. BEGIN
  4634.   ASM
  4635.     MOVE.L  A6,-(A7)
  4636.     MOVEA.L menuStrip,A0
  4637.     MOVE.L  menuNumber,D0
  4638.     MOVEA.L _IntuitionBase,A6
  4639.     JSR -144(A6)
  4640.     MOVEA.L (A7)+,A6
  4641.     MOVE.L  D0,@RESULT
  4642.   END;
  4643. END;
  4644.  
  4645. PROCEDURE LendMenus(fromwindow : pWindow; towindow : pWindow);
  4646. BEGIN
  4647.   ASM
  4648.     MOVE.L  A6,-(A7)
  4649.     MOVEA.L fromwindow,A0
  4650.     MOVEA.L towindow,A1
  4651.     MOVEA.L _IntuitionBase,A6
  4652.     JSR -804(A6)
  4653.     MOVEA.L (A7)+,A6
  4654.   END;
  4655. END;
  4656.  
  4657. FUNCTION LockIBase(dontknow : ULONG) : ULONG;
  4658. BEGIN
  4659.   ASM
  4660.     MOVE.L  A6,-(A7)
  4661.     MOVE.L  dontknow,D0
  4662.     MOVEA.L _IntuitionBase,A6
  4663.     JSR -414(A6)
  4664.     MOVEA.L (A7)+,A6
  4665.     MOVE.L  D0,@RESULT
  4666.   END;
  4667. END;
  4668.  
  4669. FUNCTION LockPubScreen(name : pCHAR) : pScreen;
  4670. BEGIN
  4671.   ASM
  4672.     MOVE.L  A6,-(A7)
  4673.     MOVEA.L name,A0
  4674.     MOVEA.L _IntuitionBase,A6
  4675.     JSR -510(A6)
  4676.     MOVEA.L (A7)+,A6
  4677.     MOVE.L  D0,@RESULT
  4678.   END;
  4679. END;
  4680.  
  4681. FUNCTION LockPubScreenList : pList;
  4682. BEGIN
  4683.   ASM
  4684.     MOVE.L  A6,-(A7)
  4685.     MOVEA.L _IntuitionBase,A6
  4686.     JSR -522(A6)
  4687.     MOVEA.L (A7)+,A6
  4688.     MOVE.L  D0,@RESULT
  4689.   END;
  4690. END;
  4691.  
  4692. FUNCTION MakeClass(classID : pCHAR; superClassID : pCHAR; superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
  4693. BEGIN
  4694.   ASM
  4695.     MOVE.L  A6,-(A7)
  4696.     MOVEA.L classID,A0
  4697.     MOVEA.L superClassID,A1
  4698.     MOVEA.L superClassPtr,A2
  4699.     MOVE.L  instanceSize,D0
  4700.     MOVE.L  flags,D1
  4701.     MOVEA.L _IntuitionBase,A6
  4702.     JSR -678(A6)
  4703.     MOVEA.L (A7)+,A6
  4704.     MOVE.L  D0,@RESULT
  4705.   END;
  4706. END;
  4707.  
  4708. FUNCTION MakeScreen(screen : pScreen): LONGINT;
  4709. BEGIN
  4710.   ASM
  4711.     MOVE.L  A6,-(A7)
  4712.     MOVEA.L screen,A0
  4713.     MOVEA.L _IntuitionBase,A6
  4714.     JSR -378(A6)
  4715.     MOVEA.L (A7)+,A6
  4716.     MOVE.L  D0,@RESULT
  4717.   END;
  4718. END;
  4719.  
  4720. FUNCTION ModifyIDCMP(window : pWindow; flags : ULONG) : BOOLEAN;
  4721. BEGIN
  4722.   ASM
  4723.     MOVE.L  A6,-(A7)
  4724.     MOVEA.L window,A0
  4725.     MOVE.L  flags,D0
  4726.     MOVEA.L _IntuitionBase,A6
  4727.     JSR -150(A6)
  4728.     MOVEA.L (A7)+,A6
  4729.     TST.W   D0
  4730.     BEQ.B   @end
  4731.     MOVEQ   #1,D0
  4732.   @end: MOVE.B  D0,@RESULT
  4733.   END;
  4734. END;
  4735.  
  4736. PROCEDURE ModifyProp(gadget : pGadget; window : pWindow; requester : pRequester; flags : ULONG; horizPot : ULONG; vertPot : ULONG; horizBody : ULONG; vertBody : ULONG);
  4737. BEGIN
  4738.   ASM
  4739.     MOVE.L  A6,-(A7)
  4740.     MOVEA.L gadget,A0
  4741.     MOVEA.L window,A1
  4742.     MOVEA.L requester,A2
  4743.     MOVE.L  flags,D0
  4744.     MOVE.L  horizPot,D1
  4745.     MOVE.L  vertPot,D2
  4746.     MOVE.L  horizBody,D3
  4747.     MOVE.L  vertBody,D4
  4748.     MOVEA.L _IntuitionBase,A6
  4749.     JSR -156(A6)
  4750.     MOVEA.L (A7)+,A6
  4751.   END;
  4752. END;
  4753.  
  4754. PROCEDURE MoveScreen(screen : pScreen; dx : LONGINT; dy : LONGINT);
  4755. BEGIN
  4756.   ASM
  4757.     MOVE.L  A6,-(A7)
  4758.     MOVEA.L screen,A0
  4759.     MOVE.L  dx,D0
  4760.     MOVE.L  dy,D1
  4761.     MOVEA.L _IntuitionBase,A6
  4762.     JSR -162(A6)
  4763.     MOVEA.L (A7)+,A6
  4764.   END;
  4765. END;
  4766.  
  4767. PROCEDURE MoveWindow(window : pWindow; dx : LONGINT; dy : LONGINT);
  4768. BEGIN
  4769.   ASM
  4770.     MOVE.L  A6,-(A7)
  4771.     MOVEA.L window,A0
  4772.     MOVE.L  dx,D0
  4773.     MOVE.L  dy,D1
  4774.     MOVEA.L _IntuitionBase,A6
  4775.     JSR -168(A6)
  4776.     MOVEA.L (A7)+,A6
  4777.   END;
  4778. END;
  4779.  
  4780. PROCEDURE MoveWindowInFrontOf(window : pWindow; behindWindow : pWindow);
  4781. BEGIN
  4782.   ASM
  4783.     MOVE.L  A6,-(A7)
  4784.     MOVEA.L window,A0
  4785.     MOVEA.L behindWindow,A1
  4786.     MOVEA.L _IntuitionBase,A6
  4787.     JSR -480(A6)
  4788.     MOVEA.L (A7)+,A6
  4789.   END;
  4790. END;
  4791.  
  4792. PROCEDURE NewModifyProp(gadget : pGadget; window : pWindow; requester : pRequester; flags : ULONG; horizPot : ULONG; vertPot : ULONG; horizBody : ULONG; vertBody : ULONG; numGad : LONGINT);
  4793. BEGIN
  4794.   ASM
  4795.     MOVE.L  A6,-(A7)
  4796.     MOVEA.L gadget,A0
  4797.     MOVEA.L window,A1
  4798.     MOVEA.L requester,A2
  4799.     MOVE.L  flags,D0
  4800.     MOVE.L  horizPot,D1
  4801.     MOVE.L  vertPot,D2
  4802.     MOVE.L  horizBody,D3
  4803.     MOVE.L  vertBody,D4
  4804.     MOVE.L  numGad,D5
  4805.     MOVEA.L _IntuitionBase,A6
  4806.     JSR -468(A6)
  4807.     MOVEA.L (A7)+,A6
  4808.   END;
  4809. END;
  4810.  
  4811. FUNCTION NewObjectA(classPtr : pIClass; classID : pCHAR; tagList : pTagItem) : POINTER;
  4812. BEGIN
  4813.   ASM
  4814.     MOVE.L  A6,-(A7)
  4815.     MOVEA.L classPtr,A0
  4816.     MOVEA.L classID,A1
  4817.     MOVEA.L tagList,A2
  4818.     MOVEA.L _IntuitionBase,A6
  4819.     JSR -636(A6)
  4820.     MOVEA.L (A7)+,A6
  4821.     MOVE.L  D0,@RESULT
  4822.   END;
  4823. END;
  4824.  
  4825. FUNCTION NextObject(objectPtrPtr : POINTER) : POINTER;
  4826. BEGIN
  4827.   ASM
  4828.     MOVE.L  A6,-(A7)
  4829.     MOVEA.L objectPtrPtr,A0
  4830.     MOVEA.L _IntuitionBase,A6
  4831.     JSR -666(A6)
  4832.     MOVEA.L (A7)+,A6
  4833.     MOVE.L  D0,@RESULT
  4834.   END;
  4835. END;
  4836.  
  4837. FUNCTION NextPubScreen(screen : pScreen; namebuf : pCHAR) : pCHAR;
  4838. BEGIN
  4839.   ASM
  4840.     MOVE.L  A6,-(A7)
  4841.     MOVEA.L screen,A0
  4842.     MOVEA.L namebuf,A1
  4843.     MOVEA.L _IntuitionBase,A6
  4844.     JSR -534(A6)
  4845.     MOVEA.L (A7)+,A6
  4846.     MOVE.L  D0,@RESULT
  4847.   END;
  4848. END;
  4849.  
  4850. FUNCTION ObtainGIRPort(gInfo : pGadgetInfo) : pRastPort;
  4851. BEGIN
  4852.   ASM
  4853.     MOVE.L  A6,-(A7)
  4854.     MOVEA.L gInfo,A0
  4855.     MOVEA.L _IntuitionBase,A6
  4856.     JSR -558(A6)
  4857.     MOVEA.L (A7)+,A6
  4858.     MOVE.L  D0,@RESULT
  4859.   END;
  4860. END;
  4861.  
  4862. PROCEDURE OffGadget(gadget : pGadget; window : pWindow; requester : pRequester);
  4863. BEGIN
  4864.   ASM
  4865.     MOVE.L  A6,-(A7)
  4866.     MOVEA.L gadget,A0
  4867.     MOVEA.L window,A1
  4868.     MOVEA.L requester,A2
  4869.     MOVEA.L _IntuitionBase,A6
  4870.     JSR -174(A6)
  4871.     MOVEA.L (A7)+,A6
  4872.   END;
  4873. END;
  4874.  
  4875. PROCEDURE OffMenu(window : pWindow; menuNumber : ULONG);
  4876. BEGIN
  4877.   ASM
  4878.     MOVE.L  A6,-(A7)
  4879.     MOVEA.L window,A0
  4880.     MOVE.L  menuNumber,D0
  4881.     MOVEA.L _IntuitionBase,A6
  4882.     JSR -180(A6)
  4883.     MOVEA.L (A7)+,A6
  4884.   END;
  4885. END;
  4886.  
  4887. PROCEDURE OnGadget(gadget : pGadget; window : pWindow; requester : pRequester);
  4888. BEGIN
  4889.   ASM
  4890.     MOVE.L  A6,-(A7)
  4891.     MOVEA.L gadget,A0
  4892.     MOVEA.L window,A1
  4893.     MOVEA.L requester,A2
  4894.     MOVEA.L _IntuitionBase,A6
  4895.     JSR -186(A6)
  4896.     MOVEA.L (A7)+,A6
  4897.   END;
  4898. END;
  4899.  
  4900. PROCEDURE OnMenu(window : pWindow; menuNumber : ULONG);
  4901. BEGIN
  4902.   ASM
  4903.     MOVE.L  A6,-(A7)
  4904.     MOVEA.L window,A0
  4905.     MOVE.L  menuNumber,D0
  4906.     MOVEA.L _IntuitionBase,A6
  4907.     JSR -192(A6)
  4908.     MOVEA.L (A7)+,A6
  4909.   END;
  4910. END;
  4911.  
  4912. FUNCTION OpenScreen(newScreen : pNewScreen) : pScreen;
  4913. BEGIN
  4914.   ASM
  4915.     MOVE.L  A6,-(A7)
  4916.     MOVEA.L newScreen,A0
  4917.     MOVEA.L _IntuitionBase,A6
  4918.     JSR -198(A6)
  4919.     MOVEA.L (A7)+,A6
  4920.     MOVE.L  D0,@RESULT
  4921.   END;
  4922. END;
  4923.  
  4924. FUNCTION OpenScreenTagList(newScreen : pNewScreen; tagList : pTagItem) : pScreen;
  4925. BEGIN
  4926.   ASM
  4927.     MOVE.L  A6,-(A7)
  4928.     MOVEA.L newScreen,A0
  4929.     MOVEA.L tagList,A1
  4930.     MOVEA.L _IntuitionBase,A6
  4931.     JSR -612(A6)
  4932.     MOVEA.L (A7)+,A6
  4933.     MOVE.L  D0,@RESULT
  4934.   END;
  4935. END;
  4936.  
  4937. FUNCTION OpenWindow(newWindow : pNewWindow) : pWindow;
  4938. BEGIN
  4939.   ASM
  4940.     MOVE.L  A6,-(A7)
  4941.     MOVEA.L newWindow,A0
  4942.     MOVEA.L _IntuitionBase,A6
  4943.     JSR -204(A6)
  4944.     MOVEA.L (A7)+,A6
  4945.     MOVE.L  D0,@RESULT
  4946.   END;
  4947. END;
  4948.  
  4949. FUNCTION OpenWindowTagList(newWindow : pNewWindow; tagList : pTagItem) : pWindow;
  4950. BEGIN
  4951.   ASM
  4952.     MOVE.L  A6,-(A7)
  4953.     MOVEA.L newWindow,A0
  4954.     MOVEA.L tagList,A1
  4955.     MOVEA.L _IntuitionBase,A6
  4956.     JSR -606(A6)
  4957.     MOVEA.L (A7)+,A6
  4958.     MOVE.L  D0,@RESULT
  4959.   END;
  4960. END;
  4961.  
  4962. FUNCTION OpenWorkBench : ULONG;
  4963. BEGIN
  4964.   ASM
  4965.     MOVE.L  A6,-(A7)
  4966.     MOVEA.L _IntuitionBase,A6
  4967.     JSR -210(A6)
  4968.     MOVEA.L (A7)+,A6
  4969.     MOVE.L  D0,@RESULT
  4970.   END;
  4971. END;
  4972.  
  4973. FUNCTION PointInImage(point : ULONG; image : pImage) : BOOLEAN;
  4974. BEGIN
  4975.   ASM
  4976.     MOVE.L  A6,-(A7)
  4977.     MOVE.L  point,D0
  4978.     MOVEA.L image,A0
  4979.     MOVEA.L _IntuitionBase,A6
  4980.     JSR -624(A6)
  4981.     MOVEA.L (A7)+,A6
  4982.     TST.W   D0
  4983.     BEQ.B   @end
  4984.     MOVEQ   #1,D0
  4985.   @end: MOVE.B  D0,@RESULT
  4986.   END;
  4987. END;
  4988.  
  4989. PROCEDURE PrintIText(rp : pRastPort; iText : pIntuiText; left : LONGINT; top : LONGINT);
  4990. BEGIN
  4991.   ASM
  4992.     MOVE.L  A6,-(A7)
  4993.     MOVEA.L rp,A0
  4994.     MOVEA.L iText,A1
  4995.     MOVE.L  left,D0
  4996.     MOVE.L  top,D1
  4997.     MOVEA.L _IntuitionBase,A6
  4998.     JSR -216(A6)
  4999.     MOVEA.L (A7)+,A6
  5000.   END;
  5001. END;
  5002.  
  5003. FUNCTION PubScreenStatus(screen : pScreen; statusFlags : ULONG) : WORD;
  5004. BEGIN
  5005.   ASM
  5006.     MOVE.L  A6,-(A7)
  5007.     MOVEA.L screen,A0
  5008.     MOVE.L  statusFlags,D0
  5009.     MOVEA.L _IntuitionBase,A6
  5010.     JSR -552(A6)
  5011.     MOVEA.L (A7)+,A6
  5012.     MOVE.L  D0,@RESULT
  5013.   END;
  5014. END;
  5015.  
  5016. FUNCTION QueryOverscan(displayID : ULONG; rect : pRectangle; oScanType : LONGINT) : LONGINT;
  5017. BEGIN
  5018.   ASM
  5019.     MOVE.L  A6,-(A7)
  5020.     MOVEA.L displayID,A0
  5021.     MOVEA.L rect,A1
  5022.     MOVE.L  oScanType,D0
  5023.     MOVEA.L _IntuitionBase,A6
  5024.     JSR -474(A6)
  5025.     MOVEA.L (A7)+,A6
  5026.     MOVE.L  D0,@RESULT
  5027.   END;
  5028. END;
  5029.  
  5030. PROCEDURE RefreshGadgets(gadgets : pGadget; window : pWindow; requester : pRequester);
  5031. BEGIN
  5032.   ASM
  5033.     MOVE.L  A6,-(A7)
  5034.     MOVEA.L gadgets,A0
  5035.     MOVEA.L window,A1
  5036.     MOVEA.L requester,A2
  5037.     MOVEA.L _IntuitionBase,A6
  5038.     JSR -222(A6)
  5039.     MOVEA.L (A7)+,A6
  5040.   END;
  5041. END;
  5042.  
  5043. PROCEDURE RefreshGList(gadgets : pGadget; window : pWindow; requester : pRequester; numGad : LONGINT);
  5044. BEGIN
  5045.   ASM
  5046.     MOVE.L  A6,-(A7)
  5047.     MOVEA.L gadgets,A0
  5048.     MOVEA.L window,A1
  5049.     MOVEA.L requester,A2
  5050.     MOVE.L  numGad,D0
  5051.     MOVEA.L _IntuitionBase,A6
  5052.     JSR -432(A6)
  5053.     MOVEA.L (A7)+,A6
  5054.   END;
  5055. END;
  5056.  
  5057. PROCEDURE RefreshWindowFrame(window : pWindow);
  5058. BEGIN
  5059.   ASM
  5060.     MOVE.L  A6,-(A7)
  5061.     MOVEA.L window,A0
  5062.     MOVEA.L _IntuitionBase,A6
  5063.     JSR -456(A6)
  5064.     MOVEA.L (A7)+,A6
  5065.   END;
  5066. END;
  5067.  
  5068. PROCEDURE ReleaseGIRPort(rp : pRastPort);
  5069. BEGIN
  5070.   ASM
  5071.     MOVE.L  A6,-(A7)
  5072.     MOVEA.L rp,A0
  5073.     MOVEA.L _IntuitionBase,A6
  5074.     JSR -564(A6)
  5075.     MOVEA.L (A7)+,A6
  5076.   END;
  5077. END;
  5078.  
  5079. FUNCTION RemakeDisplay : LONGINT;
  5080. BEGIN
  5081.   ASM
  5082.     MOVE.L  A6,-(A7)
  5083.     MOVEA.L _IntuitionBase,A6
  5084.     JSR -384(A6)
  5085.     MOVEA.L (A7)+,A6
  5086.     MOVE.L  D0,@RESULT
  5087.   END;
  5088. END;
  5089.  
  5090. PROCEDURE RemoveClass(classPtr : pIClass);
  5091. BEGIN
  5092.   ASM
  5093.     MOVE.L  A6,-(A7)
  5094.     MOVEA.L classPtr,A0
  5095.     MOVEA.L _IntuitionBase,A6
  5096.     JSR -708(A6)
  5097.     MOVEA.L (A7)+,A6
  5098.   END;
  5099. END;
  5100.  
  5101. FUNCTION RemoveGadget(window : pWindow; gadget : pGadget) : WORD;
  5102. BEGIN
  5103.   ASM
  5104.     MOVE.L  A6,-(A7)
  5105.     MOVEA.L window,A0
  5106.     MOVEA.L gadget,A1
  5107.     MOVEA.L _IntuitionBase,A6
  5108.     JSR -228(A6)
  5109.     MOVEA.L (A7)+,A6
  5110.     MOVE.L  D0,@RESULT
  5111.   END;
  5112. END;
  5113.  
  5114. FUNCTION RemoveGList(remPtr : pWindow; gadget : pGadget; numGad : LONGINT) : WORD;
  5115. BEGIN
  5116.   ASM
  5117.     MOVE.L  A6,-(A7)
  5118.     MOVEA.L remPtr,A0
  5119.     MOVEA.L gadget,A1
  5120.     MOVE.L  numGad,D0
  5121.     MOVEA.L _IntuitionBase,A6
  5122.     JSR -444(A6)
  5123.     MOVEA.L (A7)+,A6
  5124.     MOVE.L  D0,@RESULT
  5125.   END;
  5126. END;
  5127.  
  5128. PROCEDURE ReportMouse(flag : LONGINT; window : pWindow);
  5129. BEGIN
  5130.   ASM
  5131.     MOVE.L  A6,-(A7)
  5132.     MOVE.L  flag,D0
  5133.     MOVEA.L window,A0
  5134.     MOVEA.L _IntuitionBase,A6
  5135.     JSR -234(A6)
  5136.     MOVEA.L (A7)+,A6
  5137.   END;
  5138. END;
  5139.  
  5140. FUNCTION Request(requester : pRequester; window : pWindow) : BOOLEAN;
  5141. BEGIN
  5142.   ASM
  5143.     MOVE.L  A6,-(A7)
  5144.     MOVEA.L requester,A0
  5145.     MOVEA.L window,A1
  5146.     MOVEA.L _IntuitionBase,A6
  5147.     JSR -240(A6)
  5148.     MOVEA.L (A7)+,A6
  5149.     TST.W   D0
  5150.     BEQ.B   @end
  5151.     MOVEQ   #1,D0
  5152.   @end: MOVE.B  D0,@RESULT
  5153.   END;
  5154. END;
  5155.  
  5156. FUNCTION ResetMenuStrip(window : pWindow; menu : pMenu) : BOOLEAN;
  5157. BEGIN
  5158.   ASM
  5159.     MOVE.L  A6,-(A7)
  5160.     MOVEA.L window,A0
  5161.     MOVEA.L menu,A1
  5162.     MOVEA.L _IntuitionBase,A6
  5163.     JSR -702(A6)
  5164.     MOVEA.L (A7)+,A6
  5165.     TST.W   D0
  5166.     BEQ.B   @end
  5167.     MOVEQ   #1,D0
  5168.   @end: MOVE.B  D0,@RESULT
  5169.   END;
  5170. END;
  5171.  
  5172. FUNCTION RethinkDisplay : LONGINT;
  5173. BEGIN
  5174.   ASM
  5175.     MOVE.L  A6,-(A7)
  5176.     MOVEA.L _IntuitionBase,A6
  5177.     JSR -390(A6)
  5178.     MOVEA.L (A7)+,A6
  5179.     MOVE.L  D0,@RESULT
  5180.   END;
  5181. END;
  5182.  
  5183. PROCEDURE ScreenDepth(screen : pScreen; flags : ULONG; reserved : POINTER);
  5184. BEGIN
  5185.   ASM
  5186.     MOVE.L  A6,-(A7)
  5187.     MOVEA.L screen,A0
  5188.     MOVE.L  flags,D0
  5189.     MOVEA.L reserved,A1
  5190.     MOVEA.L _IntuitionBase,A6
  5191.     JSR -786(A6)
  5192.     MOVEA.L (A7)+,A6
  5193.   END;
  5194. END;
  5195.  
  5196. PROCEDURE ScreenPosition(screen : pScreen; flags : ULONG; x1 : LONGINT; y1 : LONGINT; x2 : LONGINT; y2 : LONGINT);
  5197. BEGIN
  5198.   ASM
  5199.     MOVE.L  A6,-(A7)
  5200.     MOVEA.L screen,A0
  5201.     MOVE.L  flags,D0
  5202.     MOVE.L  x1,D1
  5203.     MOVE.L  y1,D2
  5204.     MOVE.L  x2,D3
  5205.     MOVE.L  y2,D4
  5206.     MOVEA.L _IntuitionBase,A6
  5207.     JSR -792(A6)
  5208.     MOVEA.L (A7)+,A6
  5209.   END;
  5210. END;
  5211.  
  5212. PROCEDURE ScreenToBack(screen : pScreen);
  5213. BEGIN
  5214.   ASM
  5215.     MOVE.L  A6,-(A7)
  5216.     MOVEA.L screen,A0
  5217.     MOVEA.L _IntuitionBase,A6
  5218.     JSR -246(A6)
  5219.     MOVEA.L (A7)+,A6
  5220.   END;
  5221. END;
  5222.  
  5223. PROCEDURE ScreenToFront(screen : pScreen);
  5224. BEGIN
  5225.   ASM
  5226.     MOVE.L  A6,-(A7)
  5227.     MOVEA.L screen,A0
  5228.     MOVEA.L _IntuitionBase,A6
  5229.     JSR -252(A6)
  5230.     MOVEA.L (A7)+,A6
  5231.   END;
  5232. END;
  5233.  
  5234. PROCEDURE ScrollWindowRaster(win : pWindow; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  5235. BEGIN
  5236.   ASM
  5237.     MOVE.L  A6,-(A7)
  5238.     MOVEA.L win,A1
  5239.     MOVE.L  dx,D0
  5240.     MOVE.L  dy,D1
  5241.     MOVE.L  xMin,D2
  5242.     MOVE.L  yMin,D3
  5243.     MOVE.L  xMax,D4
  5244.     MOVE.L  yMax,D5
  5245.     MOVEA.L _IntuitionBase,A6
  5246.     JSR -798(A6)
  5247.     MOVEA.L (A7)+,A6
  5248.   END;
  5249. END;
  5250.  
  5251. FUNCTION SetAttrsA(obj : POINTER; tagList : pTagItem) : ULONG;
  5252. BEGIN
  5253.   ASM
  5254.     MOVE.L  A6,-(A7)
  5255.     MOVEA.L obj,A0
  5256.     MOVEA.L tagList,A1
  5257.     MOVEA.L _IntuitionBase,A6
  5258.     JSR -648(A6)
  5259.     MOVEA.L (A7)+,A6
  5260.     MOVE.L  D0,@RESULT
  5261.   END;
  5262. END;
  5263.  
  5264. PROCEDURE SetDefaultPubScreen(name : pCHAR);
  5265. BEGIN
  5266.   ASM
  5267.     MOVE.L  A6,-(A7)
  5268.     MOVEA.L name,A0
  5269.     MOVEA.L _IntuitionBase,A6
  5270.     JSR -540(A6)
  5271.     MOVEA.L (A7)+,A6
  5272.   END;
  5273. END;
  5274.  
  5275. FUNCTION SetDMRequest(window : pWindow; requester : pRequester) : BOOLEAN;
  5276. BEGIN
  5277.   ASM
  5278.     MOVE.L  A6,-(A7)
  5279.     MOVEA.L window,A0
  5280.     MOVEA.L requester,A1
  5281.     MOVEA.L _IntuitionBase,A6
  5282.     JSR -258(A6)
  5283.     MOVEA.L (A7)+,A6
  5284.     TST.W   D0
  5285.     BEQ.B   @end
  5286.     MOVEQ   #1,D0
  5287.   @end: MOVE.B  D0,@RESULT
  5288.   END;
  5289. END;
  5290.  
  5291. FUNCTION SetEditHook(hook : pHook) : pHook;
  5292. BEGIN
  5293.   ASM
  5294.     MOVE.L  A6,-(A7)
  5295.     MOVEA.L hook,A0
  5296.     MOVEA.L _IntuitionBase,A6
  5297.     JSR -492(A6)
  5298.     MOVEA.L (A7)+,A6
  5299.     MOVE.L  D0,@RESULT
  5300.   END;
  5301. END;
  5302.  
  5303. FUNCTION SetGadgetAttrsA(gadget : pGadget; window : pWindow; requester : pRequester; tagList : pTagItem) : ULONG;
  5304. BEGIN
  5305.   ASM
  5306.     MOVE.L  A6,-(A7)
  5307.     MOVEA.L gadget,A0
  5308.     MOVEA.L window,A1
  5309.     MOVEA.L requester,A2
  5310.     MOVEA.L tagList,A3
  5311.     MOVEA.L _IntuitionBase,A6
  5312.     JSR -660(A6)
  5313.     MOVEA.L (A7)+,A6
  5314.     MOVE.L  D0,@RESULT
  5315.   END;
  5316. END;
  5317.  
  5318. FUNCTION SetMenuStrip(window : pWindow; menu : pMenu) : BOOLEAN;
  5319. BEGIN
  5320.   ASM
  5321.     MOVE.L  A6,-(A7)
  5322.     MOVEA.L window,A0
  5323.     MOVEA.L menu,A1
  5324.     MOVEA.L _IntuitionBase,A6
  5325.     JSR -264(A6)
  5326.     MOVEA.L (A7)+,A6
  5327.     TST.W   D0
  5328.     BEQ.B   @end
  5329.     MOVEQ   #1,D0
  5330.   @end: MOVE.B  D0,@RESULT
  5331.   END;
  5332. END;
  5333.  
  5334. FUNCTION SetMouseQueue(window : pWindow; queueLength : ULONG) : LONGINT;
  5335. BEGIN
  5336.   ASM
  5337.     MOVE.L  A6,-(A7)
  5338.     MOVEA.L window,A0
  5339.     MOVE.L  queueLength,D0
  5340.     MOVEA.L _IntuitionBase,A6
  5341.     JSR -498(A6)
  5342.     MOVEA.L (A7)+,A6
  5343.     MOVE.L  D0,@RESULT
  5344.   END;
  5345. END;
  5346.  
  5347. PROCEDURE SetPointer(window : pWindow; pointer_ : POINTER; height : LONGINT; width : LONGINT; xOffset : LONGINT; yOffset : LONGINT);
  5348. BEGIN
  5349.   ASM
  5350.     MOVE.L  A6,-(A7)
  5351.     MOVEA.L window,A0
  5352.     MOVEA.L pointer_,A1
  5353.     MOVE.L  height,D0
  5354.     MOVE.L  width,D1
  5355.     MOVE.L  xOffset,D2
  5356.     MOVE.L  yOffset,D3
  5357.     MOVEA.L _IntuitionBase,A6
  5358.     JSR -270(A6)
  5359.     MOVEA.L (A7)+,A6
  5360.   END;
  5361. END;
  5362.  
  5363. FUNCTION SetPrefs(preferences : pPreferences; size : LONGINT; inform : LONGINT) : pPreferences;
  5364. BEGIN
  5365.   ASM
  5366.     MOVE.L  A6,-(A7)
  5367.     MOVEA.L preferences,A0
  5368.     MOVE.L  size,D0
  5369.     MOVE.L  inform,D1
  5370.     MOVEA.L _IntuitionBase,A6
  5371.     JSR -324(A6)
  5372.     MOVEA.L (A7)+,A6
  5373.     MOVE.L  D0,@RESULT
  5374.   END;
  5375. END;
  5376.  
  5377. FUNCTION SetPubScreenModes(modes : ULONG) : WORD;
  5378. BEGIN
  5379.   ASM
  5380.     MOVE.L  A6,-(A7)
  5381.     MOVE.L  modes,D0
  5382.     MOVEA.L _IntuitionBase,A6
  5383.     JSR -546(A6)
  5384.     MOVEA.L (A7)+,A6
  5385.     MOVE.L  D0,@RESULT
  5386.   END;
  5387. END;
  5388.  
  5389. PROCEDURE SetWindowPointerA(win : pWindow; taglist : pTagItem);
  5390. BEGIN
  5391.   ASM
  5392.     MOVE.L  A6,-(A7)
  5393.     MOVEA.L win,A0
  5394.     MOVEA.L taglist,A1
  5395.     MOVEA.L _IntuitionBase,A6
  5396.     JSR -816(A6)
  5397.     MOVEA.L (A7)+,A6
  5398.   END;
  5399. END;
  5400.  
  5401. PROCEDURE SetWindowTitles(window : pWindow; windowTitle : pCHAR; screenTitle : pCHAR);
  5402. BEGIN
  5403.   ASM
  5404.     MOVE.L  A6,-(A7)
  5405.     MOVEA.L window,A0
  5406.     MOVEA.L windowTitle,A1
  5407.     MOVEA.L screenTitle,A2
  5408.     MOVEA.L _IntuitionBase,A6
  5409.     JSR -276(A6)
  5410.     MOVEA.L (A7)+,A6
  5411.   END;
  5412. END;
  5413.  
  5414. PROCEDURE ShowTitle(screen : pScreen; showIt : LONGINT);
  5415. BEGIN
  5416.   ASM
  5417.     MOVE.L  A6,-(A7)
  5418.     MOVEA.L screen,A0
  5419.     MOVE.L  showIt,D0
  5420.     MOVEA.L _IntuitionBase,A6
  5421.     JSR -282(A6)
  5422.     MOVEA.L (A7)+,A6
  5423.   END;
  5424. END;
  5425.  
  5426. PROCEDURE SizeWindow(window : pWindow; dx : LONGINT; dy : LONGINT);
  5427. BEGIN
  5428.   ASM
  5429.     MOVE.L  A6,-(A7)
  5430.     MOVEA.L window,A0
  5431.     MOVE.L  dx,D0
  5432.     MOVE.L  dy,D1
  5433.     MOVEA.L _IntuitionBase,A6
  5434.     JSR -288(A6)
  5435.     MOVEA.L (A7)+,A6
  5436.   END;
  5437. END;
  5438.  
  5439. FUNCTION SysReqHandler(window : pWindow; idcmpPtr : ULONG; waitInput : LONGINT) : LONGINT;
  5440. BEGIN
  5441.   ASM
  5442.     MOVE.L  A6,-(A7)
  5443.     MOVEA.L window,A0
  5444.     MOVEA.L idcmpPtr,A1
  5445.     MOVE.L  waitInput,D0
  5446.     MOVEA.L _IntuitionBase,A6
  5447.     JSR -600(A6)
  5448.     MOVEA.L (A7)+,A6
  5449.     MOVE.L  D0,@RESULT
  5450.   END;
  5451. END;
  5452.  
  5453. FUNCTION TimedDisplayAlert(alertNumber : ULONG; string_ : pCHAR; height : ULONG; time : ULONG) : BOOLEAN;
  5454. BEGIN
  5455.   ASM
  5456.     MOVE.L  A6,-(A7)
  5457.     MOVE.L  alertNumber,D0
  5458.     MOVEA.L string_,A0
  5459.     MOVE.L  height,D1
  5460.     MOVEA.L time,A1
  5461.     MOVEA.L _IntuitionBase,A6
  5462.     JSR -822(A6)
  5463.     MOVEA.L (A7)+,A6
  5464.     TST.W   D0
  5465.     BEQ.B   @end
  5466.     MOVEQ   #1,D0
  5467.   @end: MOVE.B  D0,@RESULT
  5468.   END;
  5469. END;
  5470.  
  5471. PROCEDURE UnlockIBase(ibLock : ULONG);
  5472. BEGIN
  5473.   ASM
  5474.     MOVE.L  A6,-(A7)
  5475.     MOVEA.L ibLock,A0
  5476.     MOVEA.L _IntuitionBase,A6
  5477.     JSR -420(A6)
  5478.     MOVEA.L (A7)+,A6
  5479.   END;
  5480. END;
  5481.  
  5482. PROCEDURE UnlockPubScreen(name : pCHAR; screen : pScreen);
  5483. BEGIN
  5484.   ASM
  5485.     MOVE.L  A6,-(A7)
  5486.     MOVEA.L name,A0
  5487.     MOVEA.L screen,A1
  5488.     MOVEA.L _IntuitionBase,A6
  5489.     JSR -516(A6)
  5490.     MOVEA.L (A7)+,A6
  5491.   END;
  5492. END;
  5493.  
  5494. PROCEDURE UnlockPubScreenList;
  5495. BEGIN
  5496.   ASM
  5497.     MOVE.L  A6,-(A7)
  5498.     MOVEA.L _IntuitionBase,A6
  5499.     JSR -528(A6)
  5500.     MOVEA.L (A7)+,A6
  5501.   END;
  5502. END;
  5503.  
  5504. FUNCTION ViewAddress : pView;
  5505. BEGIN
  5506.   ASM
  5507.     MOVE.L  A6,-(A7)
  5508.     MOVEA.L _IntuitionBase,A6
  5509.     JSR -294(A6)
  5510.     MOVEA.L (A7)+,A6
  5511.     MOVE.L  D0,@RESULT
  5512.   END;
  5513. END;
  5514.  
  5515. FUNCTION ViewPortAddress(window : pWindow) : pViewPort;
  5516. BEGIN
  5517.   ASM
  5518.     MOVE.L  A6,-(A7)
  5519.     MOVEA.L window,A0
  5520.     MOVEA.L _IntuitionBase,A6
  5521.     JSR -300(A6)
  5522.     MOVEA.L (A7)+,A6
  5523.     MOVE.L  D0,@RESULT
  5524.   END;
  5525. END;
  5526.  
  5527. FUNCTION WBenchToBack : BOOLEAN;
  5528. BEGIN
  5529.   ASM
  5530.     MOVE.L  A6,-(A7)
  5531.     MOVEA.L _IntuitionBase,A6
  5532.     JSR -336(A6)
  5533.     MOVEA.L (A7)+,A6
  5534.     TST.W   D0
  5535.     BEQ.B   @end
  5536.     MOVEQ   #1,D0
  5537.   @end: MOVE.B  D0,@RESULT
  5538.   END;
  5539. END;
  5540.  
  5541. FUNCTION WBenchToFront : BOOLEAN;
  5542. BEGIN
  5543.   ASM
  5544.     MOVE.L  A6,-(A7)
  5545.     MOVEA.L _IntuitionBase,A6
  5546.     JSR -342(A6)
  5547.     MOVEA.L (A7)+,A6
  5548.     TST.W   D0
  5549.     BEQ.B   @end
  5550.     MOVEQ   #1,D0
  5551.   @end: MOVE.B  D0,@RESULT
  5552.   END;
  5553. END;
  5554.  
  5555. FUNCTION WindowLimits(window : pWindow; widthMin : LONGINT; heightMin : LONGINT; widthMax : ULONG; heightMax : ULONG) : BOOLEAN;
  5556. BEGIN
  5557.   ASM
  5558.     MOVE.L  A6,-(A7)
  5559.     MOVEA.L window,A0
  5560.     MOVE.L  widthMin,D0
  5561.     MOVE.L  heightMin,D1
  5562.     MOVE.L  widthMax,D2
  5563.     MOVE.L  heightMax,D3
  5564.     MOVEA.L _IntuitionBase,A6
  5565.     JSR -318(A6)
  5566.     MOVEA.L (A7)+,A6
  5567.     TST.W   D0
  5568.     BEQ.B   @end
  5569.     MOVEQ   #1,D0
  5570.   @end: MOVE.B  D0,@RESULT
  5571.   END;
  5572. END;
  5573.  
  5574. PROCEDURE WindowToBack(window : pWindow);
  5575. BEGIN
  5576.   ASM
  5577.     MOVE.L  A6,-(A7)
  5578.     MOVEA.L window,A0
  5579.     MOVEA.L _IntuitionBase,A6
  5580.     JSR -306(A6)
  5581.     MOVEA.L (A7)+,A6
  5582.   END;
  5583. END;
  5584.  
  5585. PROCEDURE WindowToFront(window : pWindow);
  5586. BEGIN
  5587.   ASM
  5588.     MOVE.L  A6,-(A7)
  5589.     MOVEA.L window,A0
  5590.     MOVEA.L _IntuitionBase,A6
  5591.     JSR -312(A6)
  5592.     MOVEA.L (A7)+,A6
  5593.   END;
  5594. END;
  5595.  
  5596. PROCEDURE ZipWindow(window : pWindow);
  5597. BEGIN
  5598.   ASM
  5599.     MOVE.L  A6,-(A7)
  5600.     MOVEA.L window,A0
  5601.     MOVEA.L _IntuitionBase,A6
  5602.     JSR -504(A6)
  5603.     MOVEA.L (A7)+,A6
  5604.   END;
  5605. END;
  5606.  
  5607. END. (* UNIT INTUITION *)
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.  
  5617.  
  5618.  
  5619.  
  5620.  
  5621.  
  5622.  
  5623.  
  5624.  
  5625.